This is the mail archive of the gcc@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: C pre-DR#8: va_list objects


On Tue, 28 Sep 2004, Dale Johannesen wrote:

> But what is an "object of type va_list"?  Consider:

The question here isn't what an object of type va_list is, but what it 
means for the calling function to declare one.  Functions contain 
declarations, which declare identifiers, which fall in various scopes and 
namespaces, and an identifier in a particular scope and namespace may or 
may not designate an object.  Identifiers, and not objects, are declared, 
though the declaration may cause an identifier to refer to an object.  
The standard wording is too vague to be clear about whether any case other 
than an ordinary identifier declared in the function to refer to an object 
of type va_list suffices; whether, in the case of an array, the individual 
array elements count as declared objects, or only the array is declared 
though it contains subobjects.

(The point is also that the wording should be clarified in TC3; the strict 
meaning of the existing wording is not of importance if such clarification 
can be made.)

The "what is an object" question is one extensively considered by Nick 
Maclaren (including the associated questions of when an object can be 
accessed using a particular type, or through a particular pointer with the 
right value but derived in a funny way, what the relevant type is for a 
given access and so when two accesses are or are not to the same object, 
what effective types are supposed to mean, etc.); so I'm not trying to 
cover that issue in pre-DRs.  That issue *is* one of direct relevance to 
whether optimizations are or are not valid, unlike the meaning of 
declaring an object of type va_list.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
  http://www.srcf.ucam.org/~jsm28/gcc/#c90status - status of C90 for GCC 4.0
    jsm@polyomino.org.uk (personal mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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