?
=?ISO-8859-1?Q?Bj=F8rn_Augestad?=
Hi,
I currently use a compiler which emits a warning on the following statement:
#if defined(__STDC_VERSION__) || __STDC_VERSION__ < 19990601L
....
#endif
The compiler complains that __STDC_VERSION__ isn't defined. It obviously
doesn't short circuit the expression, but evaluates both sides of the
||. I have, as a workaround, changed the statements into this:
#if !defined(__STDC_VERSION__)
#define __STDC_VERSION__ 0
#endif
#if __STDC_VERSION__ < 19990601L
....
#endif
Apart from any typos, is it legal to define __STDC_VERSION__ in user code?
I currently use a compiler which emits a warning on the following statement:
#if defined(__STDC_VERSION__) || __STDC_VERSION__ < 19990601L
....
#endif
The compiler complains that __STDC_VERSION__ isn't defined. It obviously
doesn't short circuit the expression, but evaluates both sides of the
||. I have, as a workaround, changed the statements into this:
#if !defined(__STDC_VERSION__)
#define __STDC_VERSION__ 0
#endif
#if __STDC_VERSION__ < 19990601L
....
#endif
Apart from any typos, is it legal to define __STDC_VERSION__ in user code?