Debian Bug report logs - #195468
g++ fails to recognize illformedness of certain initializers

Package: g++; Maintainer for g++ is Debian GCC Maintainers <[email protected]>; Source for g++ is src:gcc-defaults (PTS, buildd, popcon).

Reported by: Herbert Valerio Riedel <[email protected]>

Date: Fri, 30 May 2003 19:33:11 UTC

Severity: normal

Tags: upstream

Forwarded to http://gcc.gnu.org/PR12567

Full log


🔗 View this message in rfc822 format

X-Loop: [email protected]
Subject: Bug#195468: g++-3.3: default construction fails when no explicit default constructor defined
Reply-To: [email protected] (Martin v. Löwis), [email protected]
Resent-From: [email protected] (Martin v. Löwis)
Original-Sender: [email protected]
Resent-To: [email protected]
Resent-CC: Debian GCC maintainers <[email protected]>
Resent-Date: Sat, 31 May 2003 08:48:04 UTC
Resent-Message-ID: <[email protected]>
Resent-Sender: [email protected]
X-Debian-PR-Message: report 195468
X-Debian-PR-Package: g++-3.3
X-Debian-PR-Keywords: 
Received: via spool by [email protected] id=B195468.10543701417238
          (code B ref 195468); Sat, 31 May 2003 08:48:04 UTC
Received: (at 195468) by bugs.debian.org; 31 May 2003 08:35:41 +0000
Received: from mailout04.sul.t-online.com [194.25.134.18] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19M1pz-0001sQ-00; Sat, 31 May 2003 03:35:40 -0500
Received: from fwd11.sul.t-online.de 
	by mailout04.sul.t-online.com with smtp 
	id 19M1pt-0005XU-06; Sat, 31 May 2003 10:35:33 +0200
Received: from mira.informatik.hu-berlin.de (03047300346-0001@[217.232.34.170]) by fmrl11.sul.t-online.com
	with esmtp id 19M1po-0vcIM4C; Sat, 31 May 2003 10:35:28 +0200
Received: from mira.informatik.hu-berlin.de (localhost [127.0.0.1])
	by mira.informatik.hu-berlin.de (8.12.6/8.11.6/SuSE Linux 0.5) with ESMTP id h4V8ZSK8002457;
	Sat, 31 May 2003 10:35:29 +0200
Received: (from martin@localhost)
	by mira.informatik.hu-berlin.de (8.12.6/8.12.6/Submit) id h4V8ZRoa002454;
	Sat, 31 May 2003 10:35:27 +0200
X-Authentication-Warning: mira.informatik.hu-berlin.de: martin set sender to [email protected] using -f
Sender: [email protected]
To: Herbert Valerio Riedel <[email protected]>
Cc: [email protected], Phil Edwards <[email protected]>
References: <[email protected]>
	<[email protected]>
	<[email protected]>
From: [email protected] (Martin v. Löwis)
Date: 31 May 2003 10:35:27 +0200
In-Reply-To: <[email protected]>
Message-ID: <[email protected]>
Lines: 24
User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Sender: [email protected]
Delivered-To: [email protected]
X-Spam-Status: No, hits=-20.0 required=4.0
	tests=BAYES_20,EMAIL_ATTRIBUTION,IN_REP_TO,REFERENCES,
	      REPLY_WITH_QUOTES,USER_AGENT_GNUS_UA,X_AUTH_WARNING
	autolearn=ham version=2.53-bugs.debian.org_2003_05_24
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.53-bugs.debian.org_2003_05_24 (1.174.2.15-2003-03-30-exp)
Herbert Valerio Riedel <[email protected]> writes:

> ...so... is _still_ not a buggy behaviour??

No. Look at 8.5/9:

# If no initializer is specified for an object, and the object is of
# (possibly cv-qualified) non-POD class type (or array thereof), the
# object shall be default-initialized; if the object is of
# const-qualified type, the underlying class type shall have a
# user-declared default constructor.

Your objects have const-qualified type, and the underlying class has
no user-declared default constructor, hence your program is
ill-formed. 

Whether there would be any members with indeterminate state is
irrelevant, as is the fact that three other compilers fail to find
that ill-formedness.

Regards,
Martin





Send a report that this bug log contains spam.


Debian bug tracking system administrator <[email protected]>. Last modified: Tue May 13 14:31:59 2025; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU General Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.