@@ -108,6 +108,9 @@ option_proposer::build_option_suggestions (const char *prefix)
switch (i)
{
default:
+ /* We don't want to suggest disabled options. */
+ if (option->cl_disabled)
+ continue;
if (option->var_type == CLVC_ENUM)
{
const struct cl_enum *e = &cl_enums[option->var_enum];
@@ -412,10 +412,11 @@ for (i = 0; i < n_opts; i++) {
" %s,\n" \
" 0, %s,\n" \
"#else\n" \
- " 0,\n" \
+ " %s,\n" \
" 1 /* Disabled. */, %s,\n" \
"#endif\n",
- condition, cl_flags, cl_bit_fields, cl_zero_bit_fields)
+ condition, cl_flags, cl_bit_fields,
+ cl_flags, cl_zero_bit_fields)
else
printf(" %s,\n" \
" 0, %s,\n",
@@ -1435,6 +1435,10 @@ print_filtered_help (unsigned int include_flags,
continue;
}
+ /* Skip disabled options. */
+ if (option->cl_disabled)
+ continue;
+
/* Skip unwanted switches. */
if ((option->flags & exclude_flags) != 0)
continue;
new file mode 100644
@@ -0,0 +1,4 @@
+/* Verify that we get an error for unsupported -mabi=32 option. */
+/* { dg-additional-options "-mabi=32" } */
+/* { dg-error "not supported by this configuration" "" { target *-*-* } 0 } */
+void foo (void) {}