[Bug c++/17000] parse error calling member template function of non-lvalue from within template class member
--- Comment #10 from ddneilson at gmail dot com 2007-04-20 18:51 --- (In reply to comment #9) > (In reply to comment #8) > > The work around is doing: > > get_a().template func2 (); > > > > > > Which tells the compiler for sure func2 is a template. > > > > Thanks, yeh I figured that out just now. Should it happen like this though? > Surely the compiler should be able to work out it's a template and therefore > not need the qualification? > I was just about to report a similar bug, but it was also "fixed" by adding a "template" qualifier to the function call. However, when studying the bug I ran my test case through the xlC compiler. It compiles "get_a().func2();" just fine; it doesn't need "get_a().template func2();" syntax. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17000
[Bug other/23469] New: Behaviour of built-in __signbitf(x) differs with optimization
The return value of the builtin signbit(x) macro (called with a float argument) differs when compiling with optimizations or not When optimizations are off the return value is 0x8000 or 0 (signbit set and not-set, respectively). When optimizations are on (-O1) return value is 1 or 0 (signbit set and not-set, respectively). I'll attach a sample .cpp file, .ii file, and the output of -save-temps to this report. The sample .cpp file shows a simple example. The function mysignbit() is defined just as the __signbitf(x) function in include/bits/mathinline.h but returns a different value than __signbitf(x) when compiling without optimizations, but returns the same value when compiling with optimizations (-O1 and above). -- Summary: Behaviour of built-in __signbitf(x) differs with optimization Product: gcc Version: 3.4.4 Status: UNCONFIRMED Severity: normal Priority: P2 Component: other AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: ddneilson at gmail dot com CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gnu GCC host triplet: i686-pc-linux-gnu GCC target triplet: i686-pc-linux-gnu http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:43 --- Created an attachment (id=9535) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9535&action=view) Source file of example -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:44 --- Created an attachment (id=9536) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9536&action=view) .ii file generated by compiling with: g++ -Wall -v -save-temps signbit.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:45 --- Created an attachment (id=9537) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9537&action=view) Ouput from compile with: g++ -Wall -v -save-temps signbit.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:46 --- Created an attachment (id=9538) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9538&action=view) .ii file generated by compiling with: g++ -Wall -v -O1 -save-temps signbit.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:47 --- Created an attachment (id=9539) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9539&action=view) Output from compile with: g++ -Wall -v -O1 -save-temps signbit.cpp -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
-- What|Removed |Added Attachment #9537|Ouput from compile with: g++|Output from compile with: description|-Wall -v -save-temps|g++ -Wall -v -save-temps |signbit.cpp |signbit.cpp http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:49 --- Created an attachment (id=9540) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9540&action=view) Output from running the program without optimizations -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-18 20:49 --- Created an attachment (id=9541) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=9541&action=view) Output from running the program with -O1 -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469
[Bug other/23469] Behaviour of built-in __signbitf(x) differs with optimization
--- Additional Comments From ddneilson at gmail dot com 2005-08-21 20:28 --- One of the really odd things, that makes me still think this is a bug in some way is that the definition of "mysignbit()" that I gave in signbit.cpp is identical to the definition of __signbitf(x) as given in bits/mathinline.h. But, yet, when optimizations aren't turned on the two functions have differing return values; mysignbit() will return 1 iff the signbit is set, whereas __signbitf() will return 0x8000 iff the signbit is set. Furthermore, when all documented -O1 flags are turned on manually (without actually using -O1) the output of __signbitf(x) is the same as the unoptimized version; it only differs when one of the -On flags are used. -- What|Removed |Added Status|RESOLVED|UNCONFIRMED Resolution|INVALID | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=23469