public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: "Martin v. Loewis" <martin@v.loewis.de>
To: gcc-gnats@gcc.gnu.org
Subject: c++/7307: -pedantic makes errors to warnings
Date: Sun, 14 Jul 2002 08:56:00 -0000	[thread overview]
Message-ID: <200207141551.g6EFpEjj020362@mira.informatik.hu-berlin.de> (raw)


>Number:         7307
>Category:       c++
>Synopsis:       -pedantic makes errors to warnings
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          accepts-illegal
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 14 08:56:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Martin v. Loewis
>Release:        3.2 20020714 (experimental)
>Organization:
HUB
>Environment:
System: Linux mira 2.4.18-4GB #1 Wed Mar 27 13:57:05 UTC 2002 i686 unknown
Architecture: i686

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: /usr/src/egcs/configure --prefix=/usr/local/newabi --enable-shared --enable-threads --enable-languages=c,c++,java : (reconfigured)  : (reconfigured) /usr/src/egcs/configure --prefix=/usr/local/newabi --enable-shared --enable-threads --enable-languages=c,c++,java
>Description:
	-pedantic changes the status of " field `char test::test' with same name as class"
        from error to warning, thus accepting the code under -pedantic, even though it is
        ill-formed.
>How-To-Repeat:
	Compile the fragment

struct test
{
	char test;
	test();
};

	with and without -pedantic:
martin@mira:~/tmp> /usr/local/newabi/bin/g++ -S a.cc
a.cc:3: error: field `char test::test' with same name as class
martin@mira:~/tmp> /usr/local/newabi/bin/g++ -pedantic -S a.cc
a.cc:3: warning: field `char test::test' with same name as class

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


             reply	other threads:[~2002-07-14 15:56 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-14  8:56 Martin v. Loewis [this message]
2002-09-14  5:16 nathan
2002-09-14  6:06 Gabriel Dos Reis
2002-09-14 13:36 Neil Booth
2002-09-14 14:56 Gabriel Dos Reis
2002-10-31 13:46 Wolfgang Bangerth
2002-11-07  0:06 Neil Booth
2002-11-07  9:26 Wolfgang Bangerth

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=200207141551.g6EFpEjj020362@mira.informatik.hu-berlin.de \
    --to=martin@v.loewis.de \
    --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).