This is the mail archive of the 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]

[PATCH] Correct ObjC Keyword Used in p11144.C

Hi all,

This is a small patch to fix a conflict when trying to compile the C+ + testsuite with the Objective C++ compiler. Without this patch, you get this result:

$ c++ -c -ObjC++ p11144.C -O -o ./p11144.o
p11144.C:10: error: 'Id id' redeclared as different kind of symbol
<built-in>:0: error: previous declaration of 'typedef struct objc_object* id'
p11144.C: In function `Id foo()':
p11144.C:12: error: expected primary-expression before ';' token

Okay to apply?


2006-12-11 Bill Wendling <>

       * g++.old-deja/g++.mike/p11144.C: Renamed id to ID because
       id is an OjbC keyword.

Index: gcc/testsuite/g++.old-deja/g++.mike/p11144.C
--- gcc/testsuite/g++.old-deja/g++.mike/p11144.C (revision 119758)
+++ gcc/testsuite/g++.old-deja/g++.mike/p11144.C (working copy)
@@ -7,9 +7,9 @@
int d_i;
Id(int i) : d_i(i) {}
int value() {return d_i;}
-} id(1);
+} ID(1);
-Id foo() { return id; }
+Id foo() { return ID; }
int main() {
const Id &id1 = foo();

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