Have a situation where some ugly make recursion is causing -D related cflags for compilation to be duplicated (only for one file out of thousands)
When that duplication happens to include -D__STDC_LIMIT_MACROS the g++ 4.3 (using 20080111 snapshot) ends up with the following error: <command-line>: error: "__STDC_LIMIT_MACROS" redefined <command-line>: error: this is the location of the previous definition Can reproduce this as follows: rm -rf r.C touch r.C gcc-4.3-20080111/bin/g++ -c -D__STDC_LIMIT_MACROS -D__STDC_LIMIT_MACROS r.C Other -D values do not appear to cause any sort of trouble. Example: gcc-4.3-20080111/bin/g++ -c -D__BLAH -D__BLAH r.C gcc-4.3-20080111/bin/g++ -c -DXXX -DXXX r.Cvim h But it appears that duplicate -D statements for anything that starts with -D__STDC_ causes this error (-D__STDC is okay). Any explaination for the special casing of the flags that start with __STDC_? This behaviour has not been observed with g++ 4.2 or lower. -- Summary: g++ -D__STDC_LIMIT_MACROS -D__STDC_LIMIT_MACROS causes error Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: peeterj at ca dot ibm dot com GCC build triplet: x86_64-unknown-linux-gnu GCC host triplet: x86_64-unknown-linux-gnu GCC target triplet: x86_64-unknown-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34859