public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: pavenis@lanet.lv
To: gcc-gnats@gcc.gnu.org
Subject: c++/7648: Incorrect error claiming that const structure member is uninitialized
Date: Tue, 20 Aug 2002 07:16:00 -0000	[thread overview]
Message-ID: <20020820120337.6325.qmail@sources.redhat.com> (raw)


>Number:         7648
>Category:       c++
>Synopsis:       Incorrect error claiming that const structure member is uninitialized
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 20 05:06:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Andris Pavenis
>Release:        gcc-3.2 release
>Organization:
>Environment:
Linux (gcc-3.2 compiled for target i386-slackware-gnu),
DJGPP (target i586-pc-msdosdjgpp)
>Description:
gcc-3.2 release (and also gcc-3.2.1 20020819 (prerelease)) incorrectly emmits the error about uninitialized const structure member (see attached example) which is really
initialized in constructor.

Example compiles OK with gcc-3.1 release

Included example is a small fragment (with unnecessary stuff removed) from file fam-2.6.9/Fam/Scheduler.c++ from package 
fam-2.6.9

Output from gcc (options -v -c):

Reading specs from /usr/lib/gcc-lib/i386-slackware-linux/3.2/specs
Configured with: ../gcc-3.2/configure --prefix=/usr --enable-shared --with-gnu-ld --enable-threads --verbose --target=i386-slackware-linux --host=i386-slackware-linux
Thread model: posix
gcc version 3.2
 /usr/lib/gcc-lib/i386-slackware-linux/3.2/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=2 -D__GNUC_PATCHLEVEL__=0 -D__GXX_ABI_VERSION=102 -D__ELF__ -Dunix -D__gnu_linux__ -Dlinux -D__ELF__ -D__unix__ -D__gnu_linux__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ bad-20020820.cc -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -quiet -dumpbase bad-20020820.cc -version -o /tmp/ccWajwNt.s
GNU CPP version 3.2 (cpplib) (i386 Linux/ELF)
GNU C++ version 3.2 (i386-slackware-linux)
	compiled by GNU C version 3.2.
ignoring nonexistent directory "/usr/i386-slackware-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/include/c++/3.2
 /usr/include/c++/3.2/i386-slackware-linux
 /usr/include/c++/3.2/backward
 /usr/local/include
 /usr/lib/gcc-lib/i386-slackware-linux/3.2/include
 /usr/include
End of search list.
bad-20020820.cc:16: uninitialized const member `IOTypeInfo::iotype'

Andris
>How-To-Repeat:
Try compile included example with gcc-3.2 (compiler options
does not matter)
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="bad-20020820.cc"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="bad-20020820.cc"

dHlwZWRlZiB2b2lkICgqSU9IYW5kbGVyKShpbnQgZmQsIHZvaWQgKmNsb3N1cmUpOwoKc3RydWN0
IEZESW5mbyB7CiAgICBzdHJ1Y3QgRkRJT0hhbmRsZXIgewogICAgICAgIElPSGFuZGxlciBoYW5k
bGVyOwogICAgICAgIHZvaWQgKmNsb3N1cmU7CiAgICB9IHJlYWQsIHdyaXRlOwp9OwoKc3RydWN0
IElPVHlwZUluZm8gewogICAgRkRJbmZvOjpGRElPSGFuZGxlciBGREluZm86Oipjb25zdCBpb3R5
cGU7CiAgICBJT1R5cGVJbmZvKEZESW5mbzo6RkRJT0hhbmRsZXIgRkRJbmZvOjoqIGFfaW90eXBl
KSA6CiAgICAgICAgICAgIGlvdHlwZShhX2lvdHlwZSkgeyB9Cn07CgpJT1R5cGVJbmZvIGZvbyAo
JkZESW5mbzo6d3JpdGUpOwogICAgCg==


             reply	other threads:[~2002-08-20 12:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-20  7:16 pavenis [this message]
2002-09-13 15:18 nathan
2002-10-16 11:42 mmitchel
2002-10-16 11:49 mmitchel
2002-10-16 12:38 mmitchel

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020820120337.6325.qmail@sources.redhat.com \
    --to=pavenis@lanet.lv \
    --cc=gcc-gnats@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).