public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression. @ 2008-03-13 15:32 pluto at agmk dot net 2008-03-13 15:33 ` [Bug c++/35571] " pluto at agmk dot net ` (4 more replies) 0 siblings, 5 replies; 6+ messages in thread From: pluto at agmk dot net @ 2008-03-13 15:32 UTC (permalink / raw) To: gcc-bugs template < void ( *F )() > struct X { }; template < typename T > struct Y { static void f() { } typedef X< f > F; }; Y< void > test; $ g++ 0.cpp -c 0.cpp: In instantiation of ‘Y<void>’: 0.cpp:9: instantiated from here 0.cpp:7: error: ‘static void Y<T>::f() [with T = void]’ cannot appear in a constant-expression -- Summary: `static function member` cannot appeat in a constant- expression. Product: gcc Version: 4.3.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: pluto at agmk dot net http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35571] `static function member` cannot appeat in a constant-expression. 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net @ 2008-03-13 15:33 ` pluto at agmk dot net 2008-03-13 15:36 ` pluto at agmk dot net ` (3 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pluto at agmk dot net @ 2008-03-13 15:33 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from pluto at agmk dot net 2008-03-13 15:33 ------- *** Bug 35570 has been marked as a duplicate of this bug. *** -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35571] `static function member` cannot appeat in a constant-expression. 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net 2008-03-13 15:33 ` [Bug c++/35571] " pluto at agmk dot net @ 2008-03-13 15:36 ` pluto at agmk dot net 2008-03-13 16:36 ` pinskia at gcc dot gnu dot org ` (2 subsequent siblings) 4 siblings, 0 replies; 6+ messages in thread From: pluto at agmk dot net @ 2008-03-13 15:36 UTC (permalink / raw) To: gcc-bugs ------- Comment #2 from pluto at agmk dot net 2008-03-13 15:35 ------- 4.1.3, msvc8 and comeau accept this code. -- pluto at agmk dot net changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rejects-valid Known to fail| |4.2.3 4.3.0 Known to work| |4.1.3 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35571] `static function member` cannot appeat in a constant-expression. 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net 2008-03-13 15:33 ` [Bug c++/35571] " pluto at agmk dot net 2008-03-13 15:36 ` pluto at agmk dot net @ 2008-03-13 16:36 ` pinskia at gcc dot gnu dot org 2008-03-13 16:38 ` pinskia at gcc dot gnu dot org 2008-03-14 8:50 ` pluto at agmk dot net 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-03-13 16:36 UTC (permalink / raw) To: gcc-bugs ------- Comment #3 from pinskia at gcc dot gnu dot org 2008-03-13 16:36 ------- Doing: typedef X<Y:: f > F; Fixes the error message. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35571] `static function member` cannot appeat in a constant-expression. 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net ` (2 preceding siblings ...) 2008-03-13 16:36 ` pinskia at gcc dot gnu dot org @ 2008-03-13 16:38 ` pinskia at gcc dot gnu dot org 2008-03-14 8:50 ` pluto at agmk dot net 4 siblings, 0 replies; 6+ messages in thread From: pinskia at gcc dot gnu dot org @ 2008-03-13 16:38 UTC (permalink / raw) To: gcc-bugs ------- Comment #4 from pinskia at gcc dot gnu dot org 2008-03-13 16:38 ------- *** This bug has been marked as a duplicate of 35167 *** -- pinskia at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |DUPLICATE http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/35571] `static function member` cannot appeat in a constant-expression. 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net ` (3 preceding siblings ...) 2008-03-13 16:38 ` pinskia at gcc dot gnu dot org @ 2008-03-14 8:50 ` pluto at agmk dot net 4 siblings, 0 replies; 6+ messages in thread From: pluto at agmk dot net @ 2008-03-14 8:50 UTC (permalink / raw) To: gcc-bugs ------- Comment #5 from pluto at agmk dot net 2008-03-14 08:49 ------- (In reply to comment #3) > Doing: > typedef X<Y:: f > F; > > > Fixes the error message. > oh, so the comeau accepts invalid code :-) -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35571 ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2008-03-14 8:50 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-03-13 15:32 [Bug c++/35571] New: `static function member` cannot appeat in a constant-expression pluto at agmk dot net 2008-03-13 15:33 ` [Bug c++/35571] " pluto at agmk dot net 2008-03-13 15:36 ` pluto at agmk dot net 2008-03-13 16:36 ` pinskia at gcc dot gnu dot org 2008-03-13 16:38 ` pinskia at gcc dot gnu dot org 2008-03-14 8:50 ` pluto at agmk dot net
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).