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 :/
I am only one voice without much weight,
but I think we are cursed to live with trigraphs enabled...
So, patching comments to not use trigraph sequences may be the only solution.
Escaping is just kinda pointless when you could just change the string
to be acceptable to humans _and_ ANSI-compliant compilers.
There is always s/???/WTF?/ for example ;-) ;-)
Jeff
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel