On Tue, Feb 04, 2003 at 12:23:32AM -0500, Jeff Garzik wrote:
>On Tue, Feb 04, 2003 at 12:12:22AM -0500, Mike A. Harris wrote:
>> Is there anywhere in the X source code that *gasp* uses ANSI 
>> trigraphs and relies on this broken^Wwonderful feature of ANSI C 
>> being enabled?  ;o)
>> 
>> I ask because I just discovered that by default trigraphs are 
>> enabled in the sources.  I patch I am applying contains the 
>> string "(???)" which is how I discovered this.
>> 
>> I'm wondering wether disabling trigraphs by default in stock 
>> sources is considered OK, or if I should have my patch escape the 
>> trigraph sequences to not be tokenized instead?
>> 
>> Changing the "(???)" to something else is also an option, but I'd 
>> prefer to do one of the above instead, and just wondered what 
>> common consensus might be.
>
>hehe... ran into this in the Linux kernel, too, where comments
>containing "???" occur from time to time :)
>
>ANSI trigraphs are pretty damn useless these days.  However, with
>the large number of compilers XFree86 must support, I think the safe
>bet is to be fully standard compliant -- including these annoying
>trigraphs nobody wants.  Why?  The alternative is to research how to
>disable trigraphs on _every_ compiler that XFree86 may support  :/

That about sums it up.  In the interests of portable code it's best
to be as compliant as possible.

David
-- 
David Dawes
Release Engineer/Architect                      The XFree86 Project
www.XFree86.org/~dawes
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel

Reply via email to