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

2007-12-11 Thread jakub at gcc dot gnu dot org


--- Comment #9 from jakub at gcc dot gnu dot org  2007-12-11 08:22 ---
Subject: Bug 34238

Author: jakub
Date: Tue Dec 11 08:22:10 2007
New Revision: 130771

URL: http://gcc.gnu.org/viewcvs?root=gccview=revrev=130771
Log:
PR c++/34238
* decl2.c (cp_write_global_declarations): Revert 2007-11-22 change.

* g++.dg/ext/visibility/anon7.C: Add xfail.
* g++.dg/ext/visibility/anon9.C: New test.
* g++.dg/ext/visibility/anon10.C: New test.

Added:
trunk/gcc/testsuite/g++.dg/ext/visibility/anon10.C
trunk/gcc/testsuite/g++.dg/ext/visibility/anon9.C
Modified:
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/decl2.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/g++.dg/ext/visibility/anon7.C


-- 


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



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

2007-12-11 Thread jakub at gcc dot gnu dot org


--- Comment #10 from jakub at gcc dot gnu dot org  2007-12-11 08:39 ---
Fixed, at the expense of reverting PR34094 fix.


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 Resolution||FIXED


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



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

2007-12-04 Thread rguenth at gcc dot gnu dot org


--- Comment #8 from rguenth at gcc dot gnu dot org  2007-12-04 22:26 ---
*** Bug 34340 has been marked as a duplicate of this bug. ***


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rbuergel at web dot de


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



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

2007-12-02 Thread pinskia at gcc dot gnu dot org


--- Comment #7 from pinskia at gcc dot gnu dot org  2007-12-03 03:15 ---
*** Bug 34229 has been marked as a duplicate of this bug. ***


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rwgk at yahoo dot com


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



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

2007-11-29 Thread jakub at gcc dot gnu dot org


--- Comment #6 from jakub at gcc dot gnu dot org  2007-11-29 11:07 ---
Fix has been already posted 3 days ago:
http://gcc.gnu.org/ml/gcc-patches/2007-11/msg01419.html


-- 

jakub at gcc dot gnu dot org changed:

   What|Removed |Added

URL||http://gcc.gnu.org/ml/gcc-
   ||patches/2007-
   ||11/msg01419.html


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



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

2007-11-29 Thread rguenth at gcc dot gnu dot org


--- Comment #5 from rguenth at gcc dot gnu dot org  2007-11-29 11:00 ---
Yes, this looks invalid - but can we diagnose this at compile-time?

Also, from decl2.c:

  /* Error on
 namespace { struct A { static int i; }; }
 int foo () { return A::i; }
 without A::i definition (which can't be defined in
 a different CU because of the anonymous namespace).
 Don't do this if DECL_INITIAL is set, because for
 namespace { struct A { static const int i = 4; } };
 decl_needed_p won't reliably detect whether it was
 really needed.  */
  if (DECL_IN_AGGR_P (decl)  DECL_INITIAL (decl) == NULL_TREE)
error (%Jstatic data member %qD used, but not defined,
   decl, decl);

it suggests that we do not want to error in this case.  But for some reason
we do not have DECL_INITIAL set for a, but only in its
template_decl-DECL_TEMPLATE_RESULT we can find it.


-- 

rguenth at gcc dot gnu dot org changed:

   What|Removed |Added

 CC||rguenth at gcc dot gnu dot
   ||org


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



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

2007-11-28 Thread pinskia at gcc dot gnu dot org


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

   Target Milestone|--- |4.3.0


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



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

2007-11-26 Thread bero at arklinux dot org


--- Comment #3 from bero at arklinux dot org  2007-11-26 20:26 ---
Works in 4.2.x -- marking as regression


-- 

bero at arklinux dot org changed:

   What|Removed |Added

  Known to fail||4.2.0 4.2.1 4.2.2
  Known to work||4.3.0
Summary|static data member used,   |[4.3 regression] static
   |but not defined error on   |data member used, but not
   |member definition   |defined error on member
   ||definition


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



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

2007-11-26 Thread pinskia at gcc dot gnu dot org


--- 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 AT::a, though
there is no use of AT::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