On Mon, 17 Nov 2008, Andrew Pinski wrote:

> I think C99 does allows this optimization (at least according to the
> normative note 112) but C++ does not.  I could not find anything in

I don't know what you mean by "normative note" ("In accordance with Part 3 
of the ISO/IEC Directives, this foreword, the introduction, notes, 
footnotes, and examples are also for information only"), but my view 
having read the comp.std.c discussion is that this is clearly not allowed 
by C99.  It would be if a const-qualified compound literal were being used 
instead of a named variable, because of express wording allowing such 
compound literals not to designate distinct objects, but each recursive 
copy of a named variable with automatic storage duration must be a 
distinct object where this can be detected (e.g. through the address being 
taken, as here).

-- 
Joseph S. Myers
[EMAIL PROTECTED]

Reply via email to