This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/44837] New: [4.5 regression?] strange #define behavior


I'm not really sure whether this is gcc bug or what but it used to work with
gcc 4.4.x and older.

Problem description:
--------------------
I include <ucontext.h> which resides in /usr/include/sys/ucontext.h on my
system

this header contains (among others):
#ifdef __USE_GNU
enum
{
...
};
#endif

So to use this I need to #define __USE_GNU

But for some reason the preprocessor removes this part from included file like
the __USE_GNU was never defined. It happens no matter whether I define
__USE_GNU in source or on command line.

OS:
---
Arch Linux 64 bit

GCC version:
------------
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-unknown-linux-gnu/4.5.0/lto-wrapper
Target: x86_64-unknown-linux-gnu
Configured with: ../configure --prefix=/usr
--enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared
--enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu
--enable-gnu-unique-object --enable-lto --enable-plugin --disable-multilib
--disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog
--libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man
--infodir=/usr/share/info
Thread model: posix
gcc version 4.5.0 20100610 (prerelease) (GCC)

but I was able to reproduce it with the stable 4.5.0


-- 
           Summary: [4.5 regression?] strange #define behavior
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: preprocessor
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: l dot jirkovsky at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44837


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]