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]

Re: c/8236: turning on optimization breaks preprocessor output


Synopsis: turning on optimization breaks preprocessor output

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Tue Oct 15 15:22:27 2002
State-Changed-Why:
    Not a bug.  Macro arguments are determined before arguments
    are macro-expanded.  Glibc has a "feature" whereby if you
    specify optimization to GCC, it "optimizes" various library
    calls by making them into macros.
    
    It is quite entitled to do this, and so the bug is in your
    code.
    
    You can work around it by defining a macro
    
    #define my_strncmp(a, b, n) strncmp (a, b, n)
    
    and this extra level of indirection will work provided
    you use my_strncmp instead.  Of course, this may introduce
    other issues.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8236


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