public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof)
@ 2004-03-17  8:52 schmid at snake dot iap dot physik dot tu-darmstadt dot de
  2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: schmid at snake dot iap dot physik dot tu-darmstadt dot de @ 2004-03-17  8:52 UTC (permalink / raw)
  To: gcc-bugs

The appended file t.C, a reduced version of the file boost/libs/disjoint_sets/
disjoint_set_test.cpp, does not compile. Gcc 3.4.0 built on 2004-03-05 or the 
day before accepted the original code. I am wondering whether it is legal. If I 
define elts as elts[4] the code compiles. When I make do_test a free function 
the code is also accepted.  
 
template <typename DisjointSet> 
struct test_disjoint_set { 
  static void do_test() 
  { 
#if 1  
    unsigned int elts[] 
#else 
    unsigned int  elts[4] 
#endif  
        = { 0, 1, 2, 3 }; 
    const int N = sizeof(elts)/sizeof(*elts); 
  } 
}; 
 
 
    "g++"   -v -c -Wall -W "/home/peter/gnu/test/boost/libs/disjoint_sets/t.C"  
Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs 
Configured with: ../gcc/configure --enable-threads=posix --enable-languages=c,c
++,f77,objc --enable-__cxa_atexit --enable-libstdcxx-debug 
Thread model: posix 
gcc version 3.4.0 20040313 (prerelease) 
 /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -quiet -v 
-D_GNU_SOURCE /home/peter/gnu/test/boost/libs/disjoint_sets/t.C -quiet 
-dumpbase t.C -mtune=pentiumpro -auxbase t -Wall -W -version -o /tmp/ccbUIG2T.s 
ignoring nonexistent directory "NONE/include" 
ignoring nonexistent directory "/usr/local/lib/gcc/
i686-pc-linux-gnu/3.4.0/../../../../i686-pc-linux-gnu/include" 
#include "..." search starts here: 
#include <...> search starts here: 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
i686-pc-linux-gnu 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/
backward 
 /usr/local/include 
 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include 
 /usr/include 
End of search list. 
GNU C++ version 3.4.0 20040313 (prerelease) (i686-pc-linux-gnu) 
	compiled by GNU C version 3.4.0 20040313 (prerelease). 
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64274 
/home/peter/gnu/test/boost/libs/disjoint_sets/t.C: In static member function 
`static void test_disjoint_set<DisjointSet>::do_test()': 
/home/peter/gnu/test/boost/libs/disjoint_sets/t.C:11: error: invalid 
application of `sizeof' to an incomplete type

-- 
           Summary: disjoint_set_test.cpp from boost does not compile
                    (sizeof)
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: schmid at snake dot iap dot physik dot tu-darmstadt dot
                    de
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: 686-pc-linux-gnu
  GCC host triplet: 686-pc-linux-gnu
GCC target triplet: 686-pc-linux-gnu


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


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

end of thread, other threads:[~2004-03-21 17:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-17  8:52 [Bug c++/14616] New: disjoint_set_test.cpp from boost does not compile (sizeof) schmid at snake dot iap dot physik dot tu-darmstadt dot de
2004-03-17 12:16 ` [Bug c++/14616] [3.3?/3.4/3.5 regression] " giovannibajo at libero dot it
2004-03-17 12:28 ` giovannibajo at libero dot it
2004-03-17 13:09 ` giovannibajo at libero dot it
2004-03-17 13:55 ` giovannibajo at libero dot it
2004-03-17 15:38 ` pinskia at gcc dot gnu dot org
2004-03-19  8:17 ` [Bug c++/14616] [3.4/3.5 " mmitchel at gcc dot gnu dot org
2004-03-19  9:43 ` reichelt at gcc dot gnu dot org
2004-03-20  2:20 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:45 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:48 ` mmitchel at gcc dot gnu dot org
2004-03-21 17:48 ` cvs-commit at gcc dot gnu dot org
2004-03-21 17:53 ` mmitchel 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).