aboutsummaryrefslogtreecommitdiff
path: root/gcc/opts-common.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/opts-common.c')
-rw-r--r--gcc/opts-common.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/opts-common.c b/gcc/opts-common.c
index e2a315b..200951b 100644
--- a/gcc/opts-common.c
+++ b/gcc/opts-common.c
@@ -1532,7 +1532,9 @@ option_enabled (int opt_idx, unsigned lang_mask, void *opts)
/* A language-specific option can only be considered enabled when it's
valid for the current language. */
- if (option->flags & CL_LANG_ALL && !(option->flags | lang_mask))
+ if (!(option->flags & CL_COMMON)
+ && (option->flags & CL_LANG_ALL)
+ && !(option->flags & lang_mask))
return 0;
struct gcc_options *optsg = (struct gcc_options *) opts;