On Mon, Nov 21, 2011 at 11:26, Riccardo Mottola
<[email protected]>wrote:
>
> I had a look around the net and found no clear examples on how to check
> for compiler features (except the built-in functions). Checking for the gcc
> version is in my opinion a bit dirty, since then clang needs to be
> separately checked (and maybe somewhen clang will support this option,
> etc). Feature checking is always better than version checking.
>
> Any hints about it?
>

Just launch the compiler with the invalid option on a test program
containing only an empty main(), and see if launching the compiler fails to
run?

Although, as stated later in the thread, the option does seem unnecessary.

Just out of curiosity, I wonder, how do gcc and clang (particularly pre-4.0
gcc) interpret input files? This option specifies how output literals will
be encoded, but how are files themselves interpreted? As UTF-8? As current
locale? How are files interpreted on newer gcc with this option turned off
and on?

-- 
Ivan Vučica - [email protected]
_______________________________________________
Gnustep-dev mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to