Welcome! Log In Create A New Profile

Advanced

unsigned int as an enum

Posted by TheDrev 
unsigned int as an enum
April 26, 2010 02:21PM
Hi,
Since I upgraded to devkitPPC r21 I figured out that any asignment from an enum element (from 0 to N) to an unsigned int causes a crash.

is such operation is allowed by ANSI C ?
It works with gcc for PC/x86, and previous version of devkitPPC, why not now since the enum I used was > 0 ?
Re: unsigned int as an enum
April 26, 2010 02:55PM
It should work fine, as enums are just ints with a special name. I think your crash is not where you think it is.
Re: unsigned int as an enum
May 01, 2010 09:23PM
Right, the problem was a defectuous stack that crashed randomly.
Sorry, only registered users may post in this forum.

Click here to login