This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: My code wont compile in GCC
- From: Eric Christopher <echristo at redhat dot com>
- To: Jonathan Wilson <jonwil at tpgi dot com dot au>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 04 Mar 2004 17:50:54 -0800
- Subject: Re: My code wont compile in GCC
- References: <4047DB02.8090801@tpgi.com.au>
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>