This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Correct ObjC Keyword Used in p11144.C
- From: Bill Wendling <wendling at apple dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Mon, 11 Dec 2006 17:11:42 -0800
- Subject: [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?
-bw
2006-12-11 Bill Wendling <wendling@apple.com>
* 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();