Re: Making GCC less sensitive about duplicate typedefs?
Re: Making GCC less sensitive about duplicate typedefs?
- Subject: Re: Making GCC less sensitive about duplicate typedefs?
- From: Douglas Norton <email@hidden>
- Date: Tue, 20 Jun 2006 06:36:14 +0100
You could move the definition into a header, if it isn't already, and
wrap the header file contents in a #ifndef to stop subsequent
declarations being read.
// define_dummy.h
#ifndef __define_dummy_h
#define __define_dummy_h
typedef char dummy;
#endif
// main.c
#include define_dummy.h
#include define_dummy.h
int main()
{
return 0;
}
Douglas
On 20 Jun 2006, at 00:17, Mark Wagner wrote:
The following C code compiles just fine in CodeWarrior, but gcc gives
an error of "error: conflicting types for 'dummy'". How do I get this
sort of thing to compile with gcc?
typedef char dummy;
typedef char dummy;
int main()
{
return 0;
}
Thanks,
Mark Wagner
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
402point5fish.com
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden