diff options
author | Zack Weinberg <zack@gcc.gnu.org> | 2006-12-10 05:09:29 +0000 |
---|---|---|
committer | Zack Weinberg <zack@gcc.gnu.org> | 2006-12-10 05:09:29 +0000 |
commit | 566c6181e6dd7180ccc249e0b781da7a41340e50 (patch) | |
tree | c320daa7dba3673709646c3fbc979a9c5e08929b /gcc/c-opts.c | |
parent | 17c2c7754500e156295352b07b13c21d82793d61 (diff) | |
download | gcc-566c6181e6dd7180ccc249e0b781da7a41340e50.zip gcc-566c6181e6dd7180ccc249e0b781da7a41340e50.tar.gz gcc-566c6181e6dd7180ccc249e0b781da7a41340e50.tar.bz2 |
c-opts.c (c_common_parse_file): Unconditionally give a warning, suitable for the language, if set_yydebug is true.
* c-opts.c (c_common_parse_file): Unconditionally give a warning,
suitable for the language, if set_yydebug is true.
* c-pragma.h: Define enum pragma_omp_clause here. Don't define
YYDEBUG or declare yydebug.
* c-parser.c (yydebug, enum pragma_omp_clause): Delete.
* cp/parser.c: Likewise.
From-SVN: r119704
Diffstat (limited to 'gcc/c-opts.c')
-rw-r--r-- | gcc/c-opts.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/gcc/c-opts.c b/gcc/c-opts.c index 36026fd..dcb68a1 100644 --- a/gcc/c-opts.c +++ b/gcc/c-opts.c @@ -1163,14 +1163,26 @@ c_common_parse_file (int set_yydebug) { unsigned int i; - /* Enable parser debugging, if requested and we can. If requested - and we can't, notify the user. */ -#if YYDEBUG != 0 - yydebug = set_yydebug; -#else if (set_yydebug) - warning (0, "YYDEBUG was not defined at build time, -dy ignored"); -#endif + switch (c_language) + { + case clk_c: + warning(0, "The C parser does not support -dy, option ignored"); + break; + case clk_objc: + warning(0, + "The Objective-C parser does not support -dy, option ignored"); + break; + case clk_cxx: + warning(0, "The C++ parser does not support -dy, option ignored"); + break; + case clk_objcxx: + warning(0, + "The Objective-C++ parser does not support -dy, option ignored"); + break; + default: + gcc_unreachable (); + } i = 0; for (;;) |