🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.g++.bug
Article #1726

BUG in G++ 1.34.0 - missed error (a different one)

#1726
From: Ron Guilmette
Date: Sun, 12 Mar 1989 19:42
37 lines
1352 bytes
This error is related to (but different from) the last one I posted
regarding goto's jumping around object declarations.

In this case, G++ 1.34.0/Sun3 fails to issue an error when an
"unstructured" switch statement causes an apparently bogus transfer
of control past a declaration/initialization.

If an error message is ever issued for this condition, it seems like
it should be issued for the line indicated below.

/*
Description - check that "it is not possible to transfer control past a
		declaration with an (implicit or explicit) initializer"
		as called for by the "manual", section 9.11, page 296.

		This test checks that legal but "unstructured" forms of
		switch statements are not allowed to circumvent the transfer
		rules for goto statements.
*/

class c {
public:
	c (int i);
	~c ();
};

void test ()
{
	switch (1) {
	case 0:
		{
		   c c_object (1);
	case 1:				// ERROR - case in wrong binding contour
		break;
		}
	}
}
Technical Details
Message-ID: <8903121942.AA12553@riunite.aca.mcc.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!uunet!tut.cis.ohio-state.edu!MCC.COM!rfg
From: rfg@MCC.COM (Ron Guilmette)
Newsgroups: gnu.g++.bug
Subject: BUG in G++ 1.34.0 - missed error (a different one)
Message-ID: <8903121942.AA12553@riunite.aca.mcc.com>
Date: 12 Mar 89 19:42:29 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 37