diff options
| author | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-30 18:24:01 +0000 |
|---|---|---|
| committer | tromey <tromey@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-11-30 18:24:01 +0000 |
| commit | 5eb3761cfecbda73e5e1f144a77aa02faa568772 (patch) | |
| tree | 0b3662f6b39215ebc614d9eec49ad890435d7c5a | |
| parent | 409d565e4c27256115002e1c1a3e5ea1ddf78c1b (diff) | |
| download | ppe42-gcc-5eb3761cfecbda73e5e1f144a77aa02faa568772.tar.gz ppe42-gcc-5eb3761cfecbda73e5e1f144a77aa02faa568772.zip | |
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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@130544 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
| -rw-r--r-- | gcc/testsuite/gcc.dg/cpp/pr32868.c | 6 | ||||
| -rw-r--r-- | libcpp/ChangeLog | 6 | ||||
| -rw-r--r-- | libcpp/macro.c | 3 |
4 files changed, 19 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index cdcb4d1eadf..1751a3d6638 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2007-11-30 Tom Tromey <tromey@redhat.com> + + PR preprocessor/32868: + * gcc.dg/cpp/pr32868.c: New file. + 2007-11-30 Jerry DeLisle <jvdelisle@gcc.gnu.org> PR fortran/34248 diff --git a/gcc/testsuite/gcc.dg/cpp/pr32868.c b/gcc/testsuite/gcc.dg/cpp/pr32868.c new file mode 100644 index 00000000000..ea896214c30 --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/pr32868.c @@ -0,0 +1,6 @@ +/* PR preprocessor/32868. It is ok to redefine __STDC_FORMAT_MACROS. */ + +/* { dg-do preprocess } */ + +#define __STDC_FORMAT_MACROS 1 +#define __STDC_FORMAT_MACROS 1 diff --git a/libcpp/ChangeLog b/libcpp/ChangeLog index bac5e860389..3701c8000a6 100644 --- a/libcpp/ChangeLog +++ b/libcpp/ChangeLog @@ -1,3 +1,9 @@ +2007-11-30 Tom Tromey <tromey@redhat.com> + + PR preprocessor/32868: + * macro.c (_cpp_create_definition): Special case + __STDC_FORMAT_MACROS. + 2007-11-16 Michael Matz <matz@suse.de> * files.c (search_path_head): Fix check for absolute paths. diff --git a/libcpp/macro.c b/libcpp/macro.c index f3a4420ae40..754e2f77b90 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; |

