This is the mail archive of the gcc-patches@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: PATCH RFA: Support Plan 9 extensions in gcc


On Fri, 10 Apr 2009, Dave Korn wrote:

> Joseph S. Myers wrote:
> > On Thu, 9 Apr 2009, Ian Lance Taylor wrote:
> > 
> >> In order to use gcc to compile code written for the Plan 9 compiler, gcc
> >> should support these extensions.  Therefore, I propose the following
> >> patch.  This has been bootstrapped and tested on i686-pc-linux-gnu.
> > 
> > What such code is there?  Do you have proposed textual edits to C99 to 
> > define such extensions?
> > 
> > The Santa Clara WG14 minutes include "ACTION: David Keaton to rework his 
> > previous proposal on anonymous unions, adding anonymous structures as 
> > appropriate.".  Are you or anyone involved with the Plan 9 compiler 
> > working with him on proposed changes for WG14 that would include these 
> > extensions?  If these extensions are useful and already present in some 
> > other implementation, they might be appropriate to propose for C1x.
> 
>   The patch looks relatively safe to me.  It is controlled by a flag which is
> off by default and it is trivial to see by inspection that the existing code
> flow will be unperturbed when the flag is disabled.
> 
>   Since it often helps to have a working implementation in the field in order
> to drive the standards process and provide feedback as people discover any
> problems that may be lurking in the semantics, I think there's a strong
> argument for accepting the patch.  Plus it has testcases and documentation,
> what more could you ask? ;-)

Plan 9 provides such an implementation in the field to use as a basis for 
a standards proposal.  What do the Plan 9 compiler maintainers plan to do 
regarding their extensions if C1x ends up standardising something 
conflicting?  We should perhaps make clear in the documentation that if 
C1x ends up with semantics interpreting the same code differently from any 
existing or new anonymous structures and unions extension, the C1x 
semantics will replace the old extension semantics in GCC.  Doing 
otherwise involves a long-term commitment to maintaining an incompatible 
set of semantics for a nonstandard corner case.

-- 
Joseph S. Myers
joseph@codesourcery.com


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