public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/11094] New: incomplete static member breaks sizeof containing template class
@ 2003-06-04 20:35 ncm@cantrip.org
  2003-06-04 23:42 ` [Bug c++/11094] " bangerth@dealii.org
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: ncm@cantrip.org @ 2003-06-04 20:35 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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

           Summary: incomplete static member breaks sizeof containing
                    template class
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: ncm@cantrip.org
                CC: gcc-bugs@gcc.gnu.org
 GCC build triplet: *-*-*
  GCC host triplet: x86-*-linux
GCC target triplet: *-*-*

For

  template<typename T> 
    struct Foo
    {
        int c;
        static int s[];
    };

  template<typename T>
    int Foo<T>::s[sizeof(Foo<T>)];

  int* p = Foo<char>::s;

I get

$ gcc -c t.cc
t.cc: In instantiation of `Foo<char>':
t.cc:11:   instantiated from here
t.cc:9: `sizeof' applied to incomplete type `Foo<char>'
t.cc:9: creating array with size zero (`0')
t.cc:11: `s' is not a member of type `Foo<char>'

See also http://gcc.gnu.org/ml/libstdc++/2003-04/msg00045.html
and related discussion.

If this gets fixed, note that this bug may have been worked 
around in the libstdc++ implementation, probably in 3.4; grep for
_Rep_base in include/bits/basic_string.h.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
@ 2003-06-04 23:42 ` bangerth@dealii.org
  2003-06-05 20:10 ` ncm@cantrip.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: bangerth@dealii.org @ 2003-06-04 23:42 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From bangerth@dealii.org  2003-06-04 23:42 -------
See this thread
    http://gcc.gnu.org/ml/gcc/2003-06/msg00386.htmlfor some clues about the
validity of the code. FWIW,
icc accepts the code.

W.



------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
  2003-06-04 23:42 ` [Bug c++/11094] " bangerth@dealii.org
@ 2003-06-05 20:10 ` ncm@cantrip.org
  2003-06-10 10:43 ` giovannibajo@libero.it
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: ncm@cantrip.org @ 2003-06-05 20:10 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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



------- Additional Comments From ncm@cantrip.org  2003-06-05 20:10 -------
This was discussed on the ISO C++ core issues list
in messages 9868, 9869, and 9870.




------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
  2003-06-04 23:42 ` [Bug c++/11094] " bangerth@dealii.org
  2003-06-05 20:10 ` ncm@cantrip.org
@ 2003-06-10 10:43 ` giovannibajo@libero.it
  2003-06-10 10:44 ` giovannibajo@libero.it
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 9+ messages in thread
From: giovannibajo@libero.it @ 2003-06-10 10:43 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


giovannibajo@libero.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2003-06-10 10:43:40
               date|                            |


------- Additional Comments From giovannibajo@libero.it  2003-06-10 10:43 -------
-> suspended


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
                   ` (2 preceding siblings ...)
  2003-06-10 10:43 ` giovannibajo@libero.it
@ 2003-06-10 10:44 ` giovannibajo@libero.it
  2003-08-04  0:30 ` pinskia at physics dot uc dot edu
  2004-04-27  2:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 9+ messages in thread
From: giovannibajo@libero.it @ 2003-06-10 10:44 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


giovannibajo@libero.it changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |SUSPENDED


------- Additional Comments From giovannibajo@libero.it  2003-06-10 10:44 -------
This will stay suspended until the core working group comes to an agreement.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
                   ` (3 preceding siblings ...)
  2003-06-10 10:44 ` giovannibajo@libero.it
@ 2003-08-04  0:30 ` pinskia at physics dot uc dot edu
  2004-04-27  2:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 9+ messages in thread
From: pinskia at physics dot uc dot edu @ 2003-08-04  0:30 UTC (permalink / raw)
  To: gcc-bugs

PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

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


pinskia at physics dot uc dot edu changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|3.4                         |---


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
  2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
                   ` (4 preceding siblings ...)
  2003-08-04  0:30 ` pinskia at physics dot uc dot edu
@ 2004-04-27  2:46 ` pinskia at gcc dot gnu dot org
  5 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-04-27  2:46 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |rejects-valid
   Last reconfirmed|2004-02-08 05:22:41         |2004-04-27 01:22:57
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
       [not found] <bug-11094-2586@http.gcc.gnu.org/bugzilla/>
  2009-03-03 21:39 ` jason at gcc dot gnu dot org
@ 2009-03-03 22:08 ` jason at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-03 22:08 UTC (permalink / raw)
  To: gcc-bugs



-- 

jason at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |jason at gcc dot gnu dot org
                   |dot org                     |
             Status|SUSPENDED                   |ASSIGNED
   Last reconfirmed|2005-12-11 23:09:54         |2009-03-03 22:08:40
               date|                            |


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug c++/11094] incomplete static member breaks sizeof containing template class
       [not found] <bug-11094-2586@http.gcc.gnu.org/bugzilla/>
@ 2009-03-03 21:39 ` jason at gcc dot gnu dot org
  2009-03-03 22:08 ` jason at gcc dot gnu dot org
  1 sibling, 0 replies; 9+ messages in thread
From: jason at gcc dot gnu dot org @ 2009-03-03 21:39 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from jason at gcc dot gnu dot org  2009-03-03 21:39 -------
This is core issue 408, which I'm supposed to be drafting.


-- 

jason at gcc dot gnu dot org changed:

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


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


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-03-03 22:08 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-04 20:35 [Bug c++/11094] New: incomplete static member breaks sizeof containing template class ncm@cantrip.org
2003-06-04 23:42 ` [Bug c++/11094] " bangerth@dealii.org
2003-06-05 20:10 ` ncm@cantrip.org
2003-06-10 10:43 ` giovannibajo@libero.it
2003-06-10 10:44 ` giovannibajo@libero.it
2003-08-04  0:30 ` pinskia at physics dot uc dot edu
2004-04-27  2:46 ` pinskia at gcc dot gnu dot org
     [not found] <bug-11094-2586@http.gcc.gnu.org/bugzilla/>
2009-03-03 21:39 ` jason at gcc dot gnu dot org
2009-03-03 22:08 ` jason at gcc dot gnu dot org

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).