diff options
author | Tom Tromey <tromey@redhat.com> | 2007-11-30 18:24:01 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2007-11-30 18:24:01 +0000 |
commit | 607f74e9c66c810fc39b3aad9e48a22de782f643 (patch) | |
tree | 0b3662f6b39215ebc614d9eec49ad890435d7c5a /libcpp/macro.c | |
parent | 28d67019f946f87bb7373ef006caca01afe014c7 (diff) | |
download | gcc-607f74e9c66c810fc39b3aad9e48a22de782f643.zip gcc-607f74e9c66c810fc39b3aad9e48a22de782f643.tar.gz gcc-607f74e9c66c810fc39b3aad9e48a22de782f643.tar.bz2 |
re PR preprocessor/32868 (Don't warn about redefinitions of __STDC_FORMAT_MACROS)
libcpp
PR preprocessor/32868:
* macro.c (_cpp_create_definition): Special case
__STDC_FORMAT_MACROS.
gcc/testsuite
PR preprocessor/32868:
* gcc.dg/cpp/pr32868.c: New file.
From-SVN: r130544
Diffstat (limited to 'libcpp/macro.c')
-rw-r--r-- | libcpp/macro.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libcpp/macro.c b/libcpp/macro.c index f3a4420..754e2f7 100644 --- a/libcpp/macro.c +++ b/libcpp/macro.c @@ -1695,7 +1695,8 @@ _cpp_create_definition (cpp_reader *pfile, cpp_hashnode *node) /* Enter definition in hash table. */ node->type = NT_MACRO; node->value.macro = macro; - if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_"))) + if (! ustrncmp (NODE_NAME (node), DSC ("__STDC_")) + && ustrcmp (NODE_NAME (node), (const uchar *) "__STDC_FORMAT_MACROS")) node->flags |= NODE_WARN; return ok; |