Article View: gnu.g++.bug
Article #913aggregate initialization errors not caught
From: Robert R. Henry
Date: Sun, 06 Sep 1992 18:07
Date: Sun, 06 Sep 1992 18:07
17 lines
835 bytes
835 bytes
For this file, compiled with g++2.2 using ``g++ -Wall cinit.c -c'',
no error message is given.
In fact, this program is seems to be in clear violation of ARM 8.4.1,
which states that ``An aggregate is an array or an object of a class with
... no private or protected members (cf 11), no ...''
class Thing{
private:
int x,y;
public:
void doit(int);
};
Thing t = {18,19};
rrh@tera.com
Technical Details
Message-ID:
<9209061807.AA13101@tera.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tera.com!rrhShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!tera.com!rrh From: rrh@tera.com (Robert R. Henry) Newsgroups: gnu.g++.bug Subject: aggregate initialization errors not caught Message-ID: <9209061807.AA13101@tera.com> Date: 6 Sep 92 18:07:35 GMT Sender: gnulists@ai.mit.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 17 Approved: bug-g++@prep.ai.mit.edu