public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: c++/4624: Bogus warning (private in aggregate types)
@ 2001-12-15 11:46 Peter Schmid
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Schmid @ 2001-12-15 11:46 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR c++/4624; it has been noted by GNATS.

From: Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
To: nathan@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org,
        nobody@gcc.gnu.org, schmid@snake.iap.physik.tu-darmstadt.de,
        gcc-gnats@gcc.gnu.org
Cc:  
Subject: Re: c++/4624: Bogus warning (private in aggregate types)
Date: Sat, 15 Dec 2001 20:44:40 +0100 (CET)

 On 15 Dec 2001 nathan@gcc.gnu.org wrote:
 
 > Synopsis: Bogus warning (private in aggregate types)
 > 
 > State-Changed-From-To: open->closed
 > State-Changed-By: nathan
 > State-Changed-When: Sat Dec 15 11:24:25 2001
 > State-Changed-Why:
 >     I don't think it's bogus. all the user defined members
 >     are private. The class is still POD.
 >     
 > 
 > http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4624
 > 
 
 Mr John Maddock Implementor of the boost config test suite has a different
 point of view. 
 He says: "The compiler misreads 8.5.1, treating classes as non-aggregate
 if they contain private or protected member functions.",
 cf. boost/libs/config/test/boost_no_priv_aggregate.cxx.
 
 Hope this helps.
 
 Peter Schmid
 


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

* Re: c++/4624: Bogus warning (private in aggregate types)
@ 2001-12-15 11:24 nathan
  0 siblings, 0 replies; 3+ messages in thread
From: nathan @ 2001-12-15 11:24 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, schmid

Synopsis: Bogus warning (private in aggregate types)

State-Changed-From-To: open->closed
State-Changed-By: nathan
State-Changed-When: Sat Dec 15 11:24:25 2001
State-Changed-Why:
    I don't think it's bogus. all the user defined members
    are private. The class is still POD.
    

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=4624


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

* c++/4624: Bogus warning (private in aggregate types)
@ 2001-10-19 15:06 Peter Schmid
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Schmid @ 2001-10-19 15:06 UTC (permalink / raw)
  To: gcc-gnats

>Number:         4624
>Category:       c++
>Synopsis:       Bogus warning (private in aggregate types)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 19 15:06:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Peter Schmid
>Release:        3.1 20011013 (experimental)
>Organization:
TU Darmstadt
>Environment:
System: Linux kiste 2.4.10 #1 Sat Oct 6 16:57:06 CEST 2001 i686 unknown
Architecture: i686
SuSE 7.1
glibc 2.2
GNU ld version 2.11.90.0.23
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
>Description:
The following source code t.C generates a bogus "all member functions
in class `s' are private" warning, treating the class s as non
aggregate which is IMHO wrong. 

>How-To-Repeat:
source code t.C

struct s
{
private:
   void f(){ i = j; }
public:
   int i;
   int j;
};


int main()
{
   s a = {0, 0};
   (void) a;
}

compiling t.C
g++ -v t.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls --enable-clocale=gnu
Thread model: posix
gcc version 3.1 20011013 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ t.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase t.C -W -Wall -version -o /tmp/cc9Afp1Z.s
GNU CPP version 3.1 20011013 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20011013 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20011013 (experimental).
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.
t.C:2: warning: all member functions in class `s' are private
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/bin/as -V -Qy -o /tmp/cc2q7lqU.o /tmp/cc9Afp1Z.s
GNU assembler version 2.11.90.0.23 (i686-pc-linux-gnu) using BFD version 2.11.90.0.23
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/collect2 -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/crtbegin.o -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1 -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../../i686-pc-linux-gnu/lib -L/usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../.. /tmp/cc2q7lqU.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/crtend.o /usr/lib/crtn.o

>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:


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

end of thread, other threads:[~2001-12-15 19:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-15 11:46 c++/4624: Bogus warning (private in aggregate types) Peter Schmid
  -- strict thread matches above, loose matches on Subject: below --
2001-12-15 11:24 nathan
2001-10-19 15:06 Peter Schmid

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