Project Home
Project Home
Source Code
Source Code
Documents
Documents
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - typedef enum { } build issue: (3 Items)
   
typedef enum { } build issue  
Is there any reason why QNX can't handle a typedef enum{...}My_T;

If I replace with enum My_T{...}; the compiler is happy,

It reports storage class specified for parameter
RE: typedef enum { } build issue  
QNX uses the GNU Compiler Collection (gcc) compiler which happily accepts either form of definition (which are not 
exactly equivalent, BTW) so I suspect that your problem is elsewhere in your code.

________________________________________
From: Neal Hewer [community-noreply@qnx.com]
Sent: August-19-13 2:26 PM
To: general-toolchain
Subject: typedef enum { } build issue

Is there any reason why QNX can't handle a typedef enum{...}My_T;

If I replace with enum My_T{...}; the compiler is happy,

It reports storage class specified for parameter



_______________________________________________

General
http://community.qnx.com/sf/go/post104298
To cancel your subscription to this discussion, please e-mail general-toolchain-unsubscribe@community.qnx.com
Re: RE: typedef enum { } build issue  
Yes you're correct, and I suspected this so I went back to basics building a project from ground zero.  I in fact had a 
couple of issues.  The first was that my editor of choice is eclipse and I'd previously been developing known working 
code for a different target and using CLI to make.  The QNX environment was picking up the project settings and 
confusing itself.  Remedy, remove the project from my non-QNX Eclipse workspace and lose the .cproject files.  This 
known working code has well defined partitions, but there must have been something under the bonnet that was confusing 
the IDE.  What concerned me more was that I had a simple device header, no includes, only typedefs, that was throwing 
the error so god only knows what was going on here.

Thanks for the feedback anyhow