#2160 gcc (4.8.1) -DTEST option causes the constant name to be in lowercase

OTHER
closed
nobody
None
Support
duplicate
Known_bugs
False
2014-03-23
2014-01-06
kaosad
No

gcc (4.8.1) with -DTEST option causes TEST to be defined in lowercase. However, words other than TEST seem to be fine. Also, -DTEST= works fine.

Here is the output using gcc -v -DTEST -E -dM: (Notice #define test 1)

...
#define STDOUT_FILENO 1
#define test 1
#define _PID_T_ 
#define __LDBL_MIN_EXP__ (-16381)
...

Using built-in specs.
COLLECT_GCC=c:\MinGW\bin\gcc.exe
Target: mingw32
Configured with: ../gcc-4.8.1/configure --prefix=/mingw --host=mingw32 --build=m
ingw32 --without-pic --enable-shared --enable-static --with-gnu-ld --enable-lto
--enable-libssp --disable-multilib --enable-languages=c,c++,fortran,objc,obj-c++
,ada --disable-sjlj-exceptions --with-dwarf2 --disable-win32-registry --enable-l
ibstdcxx-debug --enable-version-specific-runtime-libs --with-gmp=/usr/src/pkg/gm
p-5.1.2-1-mingw32-src/bld --with-mpc=/usr/src/pkg/mpc-1.0.1-1-mingw32-src/bld --
with-mpfr= --with-system-zlib --with-gnu-as --enable-decimal-float=yes --enable-
libgomp --enable-threads --with-libiconv-prefix=/mingw32 --with-libintl-prefix=/
mingw --disable-bootstrap LDFLAGS=-s CFLAGS=-D_USE_32BIT_TIME_T
Thread model: win32
gcc version 4.8.1 (GCC)
COLLECT_GCC_OPTIONS='-v' '-D' 'TEST' '-E' '-dM' '-c' '-mtune=generic' '-march=pe
ntiumpro'
c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/cc1.exe -E -quiet -v -iprefix c:\ming
w\bin\../lib/gcc/mingw32/4.8.1/ -D TEST main.c -mtune=generic -march=pentiumpro
-dM
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
de"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
/../../include"
ignoring nonexistent directory "/mingw/include"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/inclu
de-fixed"
ignoring duplicate directory "c:/mingw/lib/gcc/../../lib/gcc/mingw32/4.8.1/../..
/../../mingw32/include"
ignoring nonexistent directory "/mingw/include"
#include "..." search starts here:
#include <...> search starts here:
c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include
c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../include
c:\mingw\bin\../lib/gcc/mingw32/4.8.1/include-fixed
c:\mingw\bin\../lib/gcc/mingw32/4.8.1/../../../../mingw32/include
End of search list.
COMPILER_PATH=c:/mingw/bin/../libexec/gcc/mingw32/4.8.1/;c:/mingw/bin/../libexec
/gcc/;c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/mingw/bin/../lib/gcc/mingw32/4.8.1/;c:/mingw/bin/../lib/gcc/;c:/
mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/lib/;c:/mingw/bin/../lib/
gcc/mingw32/4.8.1/../../../
COLLECT_GCC_OPTIONS='-v' '-D' 'TEST' '-E' '-dM' '-c' '-mtune=generic' '-march=pe
ntiumpro'

Discussion

  • Keith Marshall
    Keith Marshall
    2014-03-23

    • status: unread --> closed
    • Resolution: none --> duplicate
    • Category: Unknown --> Known_bugs
     
  • Keith Marshall
    Keith Marshall
    2014-03-23

    I'm guessing that you have a file, or a directory, named 'test' (in lower case), in your $PWD; this looks to me like a duplicate of [#2183]; (yeah, I know this predates that, but I'd already commented more comprehensively there, and both are consequences of [#2062]).

     

    Related

    Issues: #2062
    Issues: #2183