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 rtl-optimization/52785] Compile with -O fails in gcc 4.7


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

--- Comment #5 from SÃrgio Basto <sergio at serjux dot com> 2012-03-30 02:39:25 UTC ---
(In reply to comment #4)
> strndup is a macro in glibc header files.  Use (strndup) to disable the macro
> function.
> 
> This is not a GCC bug or a glibc bug (since you supply  _GNU_SOURCE which says
> define this macro) as the header is using something in the GNU_SOURCE
> namespace.

Sorry , could you help me try solve this 
the code is : 

#ifndef HAVE_STRNDUP
extern _X_EXPORT char * strndup(const char *str, size_t n);
#endif

so  -DHAVE_STRNDUP make source compile , what or how I fix the source ?


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