Dealing with compilers that pretend to be GCC
Miles Bader
miles@gnu.org
Thu Feb 2 11:01:00 GMT 2012
ludovic.courtes@inria.fr (Ludovic Courtès) writes:
> Rather than assertions, one could use predicates:
>
> #if #has_builtin(foo) && #has_attribute(bar)
> ...
> #endif
>
> The difference being that (1) predicates were designed specifically for
> this purpose, and (2) there’s no magic involved.
but ... predicates are (1) less portable, since they involve magic
syntax (whereas it's obvious how to make "magic macros" portable)
and (2) deprecated even in gcc...
-miles
--
You can hack anything you want, with TECO and DDT.
More information about the Gcc
mailing list