My code wont compile in GCC
Eric Christopher
echristo@redhat.com
Fri Mar 5 01:50:00 GMT 2004
On Thu, 2004-03-04 at 17:42, Jonathan Wilson wrote:
> 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.
Preprocessed testcases in bugzilla is the best way of getting this
solved, even a simple question is best with an error message.
This seems to work with g++ v. 3.3.2 on FC1 (since GameObject wasn't
declared I just typedef'd a char):
typedef void (*Debug_Message) (const char * msg,...);
typedef void (*Action_Reset) (GameObject *obj,float reset);
struct ScriptCommandsClass {
unsigned int version1;
unsigned int version2;
Debug_Message Debug_Message1;
Action_Reset Action_Reset1; };
-eric
--
Eric Christopher <echristo@redhat.com>
More information about the Gcc
mailing list