On Sat, Mar 28, 2015 at 02:52:31PM -0400, Henry So Jr. wrote:
> > > #if defined(__GNUC__) && __GNUC__ >= 2
> 
> Is there a better condition that lets more compilers support an enum in
> the structure?

The above #if handles any non-prehistoric gcc, all clang versions and also
Intel icc (all those claim to support GNU extensions and I've just verified
with clang and icc that they accept this).
You can also use
#if (defined(__GNUC__) && __GNUC__ >= 2) || defined(__cplusplus)
as C++ also supports it in the language (though to be fully portable you'd
need to define __extension__ to nothing if not __GNUC__ >= 2 - the
__extension__ is there to quiet up pedantic warnings or errors that ISO C89
or C99 does not support those).
Not really familiar with MSFT compilers, so somebody would need to try that
or come up with some other way of supporting it.

        Jakub

_______________________________________________
Gregorio-devel mailing list
[email protected]
https://mail.gna.org/listinfo/gregorio-devel

Répondre à