* array type has incomplete element type
@ 2005-05-01 19:26 David Yu
0 siblings, 0 replies; 2+ messages in thread
From: David Yu @ 2005-05-01 19:26 UTC (permalink / raw)
To: gcc
Hi,
What's wrong with this ? It is ok in gcc 3 not not ok with gcc4:
#define SERVICE_TYPE(type, val, state) SERVICE_##type = val,
typedef enum service_e {
SERVICE_TYPE(NONE, 0, false)
SERVICE_TYPE(FTP, 1, true)
SERVICE_TYPE_MAX
} service_type_t;
Thanks
dave
^ permalink raw reply [flat|nested] 2+ messages in thread
* re: array type has incomplete element type
@ 2005-05-02 3:40 Daniel Kegel
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Kegel @ 2005-05-02 3:40 UTC (permalink / raw)
To: dyu9999, gcc
dyu9999@gmail.com wrote:
> What's wrong with this ? It is ok in gcc 3 not not ok with gcc4:
>
> #define SERVICE_TYPE(type, val, state) SERVICE_##type = val,
> typedef enum service_e {
>
> SERVICE_TYPE(NONE, 0, false)
> SERVICE_TYPE(FTP, 1, true)
> SERVICE_TYPE_MAX
>
> } service_type_t;
Compiles fine for me with gcc-4.0.0, icc-8.1, and Comeau online.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-05-02 3:40 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-01 19:26 array type has incomplete element type David Yu
2005-05-02 3:40 Daniel Kegel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).