From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29830 invoked by alias); 8 Sep 2003 21:11:59 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 29815 invoked from network); 8 Sep 2003 21:11:58 -0000 Received: from unknown (HELO concert.shout.net) (204.253.184.25) by sources.redhat.com with SMTP; 8 Sep 2003 21:11:58 -0000 Received: from duracef.shout.net (duracef.shout.net [204.253.184.12]) by concert.shout.net (8.12.9/8.12.9) with ESMTP id h88LBvB3022619 for ; Mon, 8 Sep 2003 16:11:57 -0500 Received: from duracef.shout.net (localhost [127.0.0.1]) by duracef.shout.net (8.12.9/8.12.9) with ESMTP id h88LBvHK011544 for ; Mon, 8 Sep 2003 16:11:57 -0500 Received: (from mec@localhost) by duracef.shout.net (8.12.9/8.12.9/Submit) id h88LBvq6011543 for gdb-patches@sources.redhat.com; Mon, 8 Sep 2003 17:11:57 -0400 Date: Mon, 08 Sep 2003 21:11:00 -0000 From: Michael Elizabeth Chastain Message-Id: <200309082111.h88LBvq6011543@duracef.shout.net> To: gdb-patches@sources.redhat.com Subject: [rfa/testsuite] avoid 'gamma' function name X-SW-Source: 2003-09/txt/msg00132.txt.bz2 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? Michael C === 2003-09-08 Michael Chastain * gdb.base/gdb1250.c: Rename 'gamma' to 'my_gamma'. Index: gdb.base/gdb1250.c =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/gdb1250.c,v retrieving revision 1.1 diff -u -r1.1 gdb1250.c --- gdb.base/gdb1250.c 15 Jul 2003 16:28:21 -0000 1.1 +++ gdb.base/gdb1250.c 8 Sep 2003 21:05:19 -0000 @@ -25,7 +25,11 @@ int global = 0; -void gamma (int *parray) +/* Foo, gcc thinks 'gamma' is a reserved identifier. + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12213 + I am not interested in testing that point so just avoid the word. + -- chastain 2003-09-08. */ +void my_gamma (int *parray) { return; } @@ -37,7 +41,7 @@ array [1] = global++; array [2] = global++; array [3] = global++; - gamma (array); + my_gamma (array); abort (); }