This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Dealing with compilers that pretend to be GCC


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]