This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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: [rfa/testsuite] avoid 'gamma' function name


On Mon, Sep 08, 2003 at 05:11:57PM -0400, Michael Elizabeth Chastain wrote:
> This patchlet works around a recent change in gcc HEAD where 'gamma' is
> now a reserved identifier, even when 'math.h' is not included.
> 
> I've reported this as a regression bug against gcc:
> 
>   http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213
>   [3.4 regression] warning: conflicting types for builtin-function 'gamma'
> 
> I'm pretty sure this is actually a bug in gcc.  A draft of the C9x spec
> says that all external library names are reserved, and does not qualify
> that by saying that the header file for that name has to be included.
> However, the particular name 'gamma' is an obsolete name and not
> mentioned in the standard.
> 
> However -- the purpose of gdb1250.exp is to test backtracing and
> prologue analysis.  It's not to test C library reserved identifiers.
> So this patch just avoids the issue.
> 
> Testing: tested on native i686-pc-linux-gnu, gcc v2 and v3, dwarf-2 and
> stabs+.  Specifically tested with gcc HEAD that thinks 'gamma' is
> a reserved identifier.
> 
> Okay to commit?

Sounds reasonable to me.  I'm 99.9% sure you're right about the GCC
bug, too - at least if gcc HEAD defaults to gnu99 mode?

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


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