diff options
author | Jakub Jelinek <jakub@redhat.com> | 2017-01-04 22:26:50 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2017-01-04 22:26:50 +0100 |
commit | 742b18041a2624da73d57abfaa44b04fbe55fe37 (patch) | |
tree | e2c4bfd992f175d709e686b685bdecafae0e6628 /gcc | |
parent | fc73e60cdedea7002feb76bf066227b9620bf5a8 (diff) | |
download | gcc-742b18041a2624da73d57abfaa44b04fbe55fe37.zip gcc-742b18041a2624da73d57abfaa44b04fbe55fe37.tar.gz gcc-742b18041a2624da73d57abfaa44b04fbe55fe37.tar.bz2 |
optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without RejectNegative.
* optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without
RejectNegative.
From-SVN: r244073
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/optc-gen.awk | 5 |
2 files changed, 8 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 242bf69..5181fe8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2017-01-04 Jakub Jelinek <jakub@redhat.com> + * optc-gen.awk: Emit #error for -W*/-f*/-m* Enum without + RejectNegative. + * dwarf2out.c (output_loc_list): Don't throw away 64K+ location descriptions for -gdwarf-5 and emit them as uleb128 instead of 2-byte data. diff --git a/gcc/optc-gen.awk b/gcc/optc-gen.awk index dd22515..cb3214a 100644 --- a/gcc/optc-gen.awk +++ b/gcc/optc-gen.awk @@ -326,6 +326,11 @@ for (i = 0; i < n_opts; i++) { alias_data = "NULL, NULL, OPT_SPECIAL_ignore" else alias_data = "NULL, NULL, N_OPTS" + if (flag_set_p("Enum.*", flags[i])) { + if (!flag_set_p("RejectNegative", flags[i]) \ + && opts[i] ~ "^[Wfm]") + print "#error Enum allowing negative form" + } } else { alias_opt = nth_arg(0, alias_arg) alias_posarg = nth_arg(1, alias_arg) |