This is the mail archive of the gcc-help@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: Incorrect (?) template specialization results when compiling with -O3


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@irotas.net> 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


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