Re: Incorrect (?) template specialization results when compiling with -O3

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

 



On Fri, Jul 10, 2009 at 10:39 AM, Adam McLaurin<gcc@xxxxxxxxxx> wrote:
> Hmm, I think maybe this is the problem:
> http://stackoverflow.com/questions/59331/visibility-of-template-specialization-of-c-function
>
> This is really a nasty thing ...
>
> -Adam
>
>
> On Fri, 10 Jul 2009 07:17 -0400, "Adam McLaurin" <gcc@xxxxxxxxxx> wrote:
>> If I compile with anything other than -O3, I get:
>> getString<double>(): T
>> getString<int>():    int
>>
>> However, with -O3 I get:
>> -$ ./functemp
>> getString<double>(): T
>> getString<int>():    T

But int your example, isn't the <int> specialization visible at the
point the call is made - even if it is through the header file?

-- 
Andrew Bell
andrew.bell.ia@xxxxxxxxx


[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