[RFC patch]: Feature of type attribute "uuid" and corresponding C/C++ language extension to query value of type attribute uuid

Joseph S. Myers joseph@codesourcery.com
Sat Jan 9 16:49:00 GMT 2010


On Sat, 9 Jan 2010, Kai Tietz wrote:

> I would like to add to upcoming gcc 4.6 the feature of having the
> ability to add via the attribute "uuid" a property to specifc types,
> which can be later queried by __uuidof (the current draft
> implementation uses here __builtin_uuidof, but as it is more
> equivalent to sizeof/typeof/alignof operators, it should be possibly
> named better __uuidof).
> The initial motivation for this feature was, that gcc can be support
> DCOM classes, types, and records in a same way as vendor compiler can.

Does the vendor compiler have documentation of the semantics of this 
extension (including such questions as when a VLA or VM operand is 
evaluated - which should generally be determined based on whether the 
result can depend on the values of such expressions)?  I note that this 
patch is incomplete, in that it does not add any such documentation (it 
doesn't even update the syntax comments in the C and C++ parsers to show 
the syntax productions for the new construct and how they fit in the 
grammar), so making it impossible to review.  It also lacks testcases for 
the rules about when an operand is evaluated (see gnu99-static-1.c for an 
example of one thing that needs checking, apart from basic questions about 
whether side effects in size expressions inside the operand are 
evaluated).

-- 
Joseph S. Myers
joseph@codesourcery.com



More information about the Gcc-patches mailing list