Re: (undocumented?) difference between gcc 4.6 and 4.7 (C++ implicit template instantiation)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 28 August 2012 16:32, Christoph Groth wrote:
> Dear GCC experts,
>
> I've been unable to find a description of this issue in any changelog.
> Actually, I wonder whether the behavior of 4.6 or that of 4.7 is the
> correct one with regard to the C++ language standard.
>
> Is this a known issue which has been fixed in 4.7, or rather a
> regression from 4.6?

The change in behaviour might be due to the patch for
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48883

But I think the program has undefined behaviour according to
[expr.reinterpret.cast]/6, because it calls a function through a
pointer to a different function type.  Specifically, something<long>
which has type void*(Class<long>*) is called through a pointer of type
void*(*)(void*).


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux