Please fix anonymous struct/union issue
-
- Posts: 1
- Joined: Sat Jan 07, 2012 9:25 am
- Contact:
Please fix anonymous struct/union issue
I just ported my code from chipmunk 5.3.4 to 6.0.0 , but when I finished porting the APIs and came to compile my project I got tons of errors. The problem was provoked by the new file "cpBBTree.c", within which anonymous struct/union was used and my compiler couldn't recognize that. I googled it and found anonymous struct/union is not supported by C99 standard, but acceptable by GNU99 standard. Consequently I had to use "std=gnu99" for my compiler and the issue is clear , but picking out this issue still cost me some amount of time . As anonymous struct/union is not necessary for coding I wonder if this can be viewed as a bug and fixed in some time, or as least a tip should be included in documentation to avoid wasting time solving the compiler issue. Thanks.
- slembcke
- Site Admin
- Posts: 4166
- Joined: Tue Aug 14, 2007 7:13 pm
- Contact:
Re: Please fix anonymous struct/union issue
Update to 6.0.3, it was fixed a few minor versions ago I think. Anonymous unions/structs are fine in C++, but I didn't like relying on the GNU extension in C. Chipmunk targets the intersection of language features offered by C++ and C99 to get compatibility with MSVC as well.
Can't sleep... Chipmunks will eat me...
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Check out our latest projects! -> http://howlingmoonsoftware.com/wordpress/
Who is online
Users browsing this forum: No registered users and 2 guests