[Bug c++/34238] [4.3 regression] "static data member used, but not defined" error on member definition

pinskia at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Mon Nov 26 20:32:00 GMT 2007



------- Comment #4 from pinskia at gcc dot gnu dot org  2007-11-26 20:32 -------
(In reply to comment #2)
> Small testcase:
> // PR c++/34238
> // { dg-do compile }
> namespace
> {
>   template <typename T = int> struct A
>   {
>     static const bool a = true;
>   };
> };
> struct A<> a;

Hmm, I think this is invalid code.  There is no definition of A<T>::a, though
there is no use of A<T>::a.


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |pinskia at gcc dot gnu dot
                   |                            |org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34238



More information about the Gcc-bugs mailing list