Article View: gnu.gcc.help
Article #52002Variable Length Array Syntax
From: Richard Stallman
Date: Thu, 11 Feb 1993 06:27
Date: Thu, 11 Feb 1993 06:27
42 lines
2480 bytes
2480 bytes
Here are answers to some questions people have asked me in regard to the variable length array syntax issue. * Why is the out-of-order syntax hard to implement in GCC? GCC determines the data type of each expression when it parses and constructs the expression. If the variable is a forward reference whose data type is not known, this cannot work. To add facilities for making expressions whose types are not known, and to fill in the types later, would require duplicating a lot of the code for parsing C expressions. * Should we oppose out-of-order syntax just to facilitate GCC maintenance? If you want to use GCC, that reason is a pretty good one. There are limited resources for maintaining GCC, and if unnecessary burdens are placed on these resources, we may be unable to do a good job. But that reason may not even apply--because, if it is up to me, I would simply not implement out-of-order parsing, even if someone else does all the work. The reason for my inclination is also the main reason to oppose out-of-order parsing: it does not fit the C language. It discards a basic organizing principle that helps make sense of the language. It makes programs harder to understand. The NCEG proposal describes several funny cases which need special disambiguation rules. There are others they have not addressed. The existence of these cases is a symptom of the uncleanness of the proposal. I've proposed using forward declarations instead of out-of-order parsing because forward declarations are used to handle all other such cases in C. * What exactly is the other proposal NCEG is considering? I do not have a copy except on paper, and I can't spend the FSF's scarce resources typing it in. However, NCEG is supposed to release it when they get it ready online. So you should be able to get a copy by and by.
Technical Details
Message-ID:
<9302110625.AA06736@mole.gnu.ai.mit.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rmsShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,a7764939b2d530a6,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1993-02-11 00:19:37 PST Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!agate!spool.mu.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!gnu.ai.mit.edu!rms From: rms@gnu.ai.mit.edu (Richard Stallman) Newsgroups: gnu.gcc.help Subject: Variable Length Array Syntax Date: 11 Feb 1993 01:27:17 -0500 Organization: GNUs Not Usenet Lines: 43 Sender: daemon@cis.ohio-state.edu Distribution: gnu Message-ID: <9302110625.AA06736@mole.gnu.ai.mit.edu>