This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposed Opengroup action for c99 command (XCU ERN 76)
- From: Joe Buck <Joe dot Buck at synopsys dot COM>
- To: Paul Eggert <eggert at CS dot UCLA dot EDU>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 14 Sep 2005 15:06:57 -0700
- Subject: Re: proposed Opengroup action for c99 command (XCU ERN 76)
- References: <877jdjqsqc.fsf@penguin.cs.ucla.edu>
On Wed, Sep 14, 2005 at 01:50:19PM -0700, Paul Eggert wrote:
> In response Joseph S. Myers pointed out that this action would require
> c99 to use interpretation B of section 5.2.1 (page 20) of the C99 Rationale
> <http://www.open-std.org/jtc1/sc22/wg14/www/C99RationaleV5.10.pdf>.
> The Rationale says C preprocessors can be implemented in three ways:
>
> A. Convert everything to UCNs in basic source characters as soon
> as possible, that is, in translation phase 1. (This is what
> C++ requires, apparently.)
>
> B. Use native encodings where possible, UCNs otherwise.
>
> C. Convert everything to wide characters as soon as possible
> using an internal encoding that encompasses the entire source
> character set and all UCNs.
>
> The C99 standardizers chose (B), but said implementations could also
> use (A) or (C) because the C99 standard gives almost unlimited freedom
> in translation phase 1 for compilers to do whatever transformations
> they like.
>
> However, the proposed action for the c99 command would close this
> escape hatch, forcing interpretation (B) for c99 implementations.
>
> So my question is: Is it a burden on GCC to require interpretation (B)?
This is written in terms of internal implementation rather than visible
behavior. Can you provide an example that lets us distinguish a compiler
that uses method A, from a compiler that uses method B? If "where
possible" in B simply means "in cases where otherwise the user could
tell that we aren't doing A", then there would be no observable
difference.