From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10527 invoked by alias); 20 Sep 2009 16:12:04 -0000 Received: (qmail 10460 invoked by uid 48); 20 Sep 2009 16:11:46 -0000 Date: Sun, 20 Sep 2009 16:12:00 -0000 Subject: [Bug c++/41420] New: Command-line defines(-D) are not working with include(-I) X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "smal dot root at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg01888.txt.bz2 We have simple source file: file.64.cpp int main() { #ifdef SOME64 printf("64\r\n"); #else printf("32\r\n"); #endif return 0; } So. If we build file with that command $CC -DSOME64 -I../../common/src -O0 -g3 -Wall -c "systemcontroller.64.cpp" then SOME64 are undefined in file(../../common/src is valid path). if we erase include block(-I) or write invalid path like this $CC -DSOME64 -I../../common/src_1 -O0 -g3 -Wall -c "systemcontroller.64.cpp" than everithing work fine... i mean SOME64 are defined in file. $CC can be g++, gcc, cc, c++. os: Bluewhite64-current gcc-config: Reading specs from /usr/lib/gcc/x86_64-pc-linux/4.3.3/specs Target: x86_64-pc-linux Configured with: ../gcc-4.3.3/configure --prefix=/usr --libdir=/usr/lib --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,fortran,java,objc --enable-threads=posix --enable-checking=release --with-system-zlib --disable-libunwind-exceptions --enable-__cxa_atexit --enable-libssp --with-gnu-ld --verbose --disable-multilib --target=x86_64-pc-linux --build=x86_64-pc-linux --host=x86_64-pc-linux Thread model: posix gcc version 4.3.3 (GCC) -- Summary: Command-line defines(-D) are not working with include(- I) Product: gcc Version: 4.3.3 Status: UNCONFIRMED Severity: critical Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: smal dot root at gmail dot com GCC build triplet: x86_64 GCC host triplet: x86_64 GCC target triplet: x86_64 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41420