c++/3518: [2003-05-03] default conversion applied too soon
giovannibajo@libero.it
giovannibajo@libero.it
Thu May 15 12:49:00 GMT 2003
Old Synopsis: [2003-01-02] default conversion applied too soon
New Synopsis: [2003-05-03] default conversion applied too soon
State-Changed-From-To: analyzed->feedback
State-Changed-By: bajo
State-Changed-When: Thu May 15 11:00:10 2003
State-Changed-Why:
Nathan, I see what you are saying but I think the code is
still legal. The applicable ctor is attempting to create
a const qualified _reference_ to function type, which is
a valid type. In fact, other compilers like Comeau/EDG
instanciate the constructor with [T = void(void)].
GCC compiles the code, but applies the default conversion
too soon, so instanciates the template with [T = (void)(*)(void)]
which is wrong. If you agree, we can rework a code snippet
which fails if T is a function pointer so that we can
properly detect the bug.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=3518
More information about the Gcc-bugs
mailing list