public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Franz.Sirl-kernel@lauterbach.com
To: gcc-gnats@gcc.gnu.org
Subject: c++/10031: 3.3/mainline c++ regression
Date: Tue, 11 Mar 2003 21:06:00 -0000	[thread overview]
Message-ID: <20030311210227.4116.qmail@sources.redhat.com> (raw)


>Number:         10031
>Category:       c++
>Synopsis:       3.3/mainline c++ regression
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 11 21:06:00 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator:     Franz.Sirl-kernel@lauterbach.com
>Release:        gcc-3.3, gcc-3.4
>Organization:
>Environment:

>Description:
Since the bugfix for c++/9367 you'll see the following message if you compile the attached testcase with "g++ -c test-vprintf.cpp -O2 -ansi -pedantic-errors":

test-vprintf.cpp: In function `int vprintf(const char*, __va_list_tag*)':
test-vprintf.cpp:19: error: declaration of `int vprintf(const char*,
   __va_list_tag*) throw ()' throws different exceptions
test-vprintf.cpp:16: error: than previous declaration `int vprintf(const
char*,
   __va_list_tag*)'

Reportedly it happens on alpha-linux, powerpc-linux and x86_64-linux, but not on i686-linux.

>How-To-Repeat:
typedef __builtin_va_list __gnuc_va_list;

extern "C"
{

struct FILE
{
  int _flags;
};

extern struct FILE *stdout;

extern int vfprintf (FILE *__restrict __s, __const char *__restrict __format,
                     __gnuc_va_list __arg) throw ();

extern int vprintf (__const char *__restrict __format, __gnuc_va_list __arg) throw ();

inline int vprintf (__const char *__restrict __fmt, __gnuc_va_list __arg) throw ()
{
  return vfprintf (stdout, __fmt, __arg);
}

}
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/x-c++src; name="test-vprintf.cpp"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="test-vprintf.cpp"

dHlwZWRlZiBfX2J1aWx0aW5fdmFfbGlzdCBfX2dudWNfdmFfbGlzdDsKCmV4dGVybiAiQyIgCnsK
ICAKc3RydWN0IEZJTEUgCnsKICBpbnQgX2ZsYWdzOwp9OwoKZXh0ZXJuIHN0cnVjdCBGSUxFICpz
dGRvdXQ7CgpleHRlcm4gaW50IHZmcHJpbnRmIChGSUxFICpfX3Jlc3RyaWN0IF9fcywgX19jb25z
dCBjaGFyICpfX3Jlc3RyaWN0IF9fZm9ybWF0LAoJCSAgICAgX19nbnVjX3ZhX2xpc3QgX19hcmcp
IHRocm93ICgpOwoKZXh0ZXJuIGludCB2cHJpbnRmIChfX2NvbnN0IGNoYXIgKl9fcmVzdHJpY3Qg
X19mb3JtYXQsIF9fZ251Y192YV9saXN0IF9fYXJnKSB0aHJvdyAoKTsKCmlubGluZSBpbnQgdnBy
aW50ZiAoX19jb25zdCBjaGFyICpfX3Jlc3RyaWN0IF9fZm10LCBfX2dudWNfdmFfbGlzdCBfX2Fy
ZykgdGhyb3cgKCkKewogIHJldHVybiB2ZnByaW50ZiAoc3Rkb3V0LCBfX2ZtdCwgX19hcmcpOwp9
Cgp9Cg==


                 reply	other threads:[~2003-03-11 21:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20030311210227.4116.qmail@sources.redhat.com \
    --to=franz.sirl-kernel@lauterbach.com \
    --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).