This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
My code wont compile in GCC
- From: Jonathan Wilson <jonwil at tpgi dot com dot au>
- To: gcc at gcc dot gnu dot org
- Date: Fri, 05 Mar 2004 09:42:26 +0800
- Subject: My code wont compile in GCC
Basicly, I have this: (in C++ code)
typedef void (*Debug_Message) (const char * msg,...);
typedef void (*Action_Reset) (GameObject *obj,float reset);
...more similar items
then later I have this:
struct ScriptCommandsClass {
unsigned int version1;
unsigned int version2;
Debug_Message Debug_Message;
Action_Reset Action_Reset;
...more similar items
};
However, GCC tells me that what I have is an error.
The code compiles just fine on Visual C++.
Is this:
A.a bug in GCC
B.a bug in visual C++
C.something GCC specific
or D.A case where GCC follows the C++ standard but Visual C++ does not.
Code compiles fine in Visual C++ 6 and at least one later version but not
GCC 3.3.1
Can anyone suggest a fix that will get this code compiling in both compilers?