Issues using C99 on the Link?

1 reply [Last post]
assemblr
assemblr's picture
Title: NooBot
Joined: 03/11/2013
Posts:
BotPoints: 12
User offline. Last seen 9 years 27 weeks ago.

I want to use some features from C99, so I added -std=c99 to the /etc/kovan/platform.hints, but somehow, that broke something else: the compiler is now complaining the M_PI is no longer defined, even though I've clearly included math.h. It looks like __USE_BSD is somehow getting defined when C99 is not being used, but it isn't when C99 mode is turned on.

I could just add a #define right before including math.h, but I'm worried that switching to C99 is breaking something internally. Any idea what's going on and what needs to be fixed to viably use C99 on the Link?

Beta
Beta's picture
Title: The Magnificent
Joined: 02/24/2012
Posts:
BotPoints: 266
User offline. Last seen 8 years 34 weeks ago.

Hmmm... I've used C99 without problem several times. I wouldn't worry about it unless you start seeing other anomalous behavior.

Braden McDorman

Developer of the KIPR Link, KISS IDE, KIPR's 2D Simulator, and CBCJVM.

Reach me at bmcdorman(cat)kipr(dog)org where (cat)=@ and (dog)=. if you need assistance of any kind.