public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "joseph at codesourcery dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug bootstrap/44426] [4.5/4.6 Regression] gcc 4.5.0 requires c9x compiler to build
Date: Sat, 05 Jun 2010 17:37:00 -0000 [thread overview]
Message-ID: <20100605173656.4699.qmail@sourceware.org> (raw)
In-Reply-To: <bug-44426-16543@http.gcc.gnu.org/bugzilla/>
------- Comment #4 from joseph at codesourcery dot com 2010-06-05 17:36 -------
Subject: Re: [4.5/4.6 Regression] gcc 4.5.0 requires
c9x compiler to build
On Sat, 5 Jun 2010, manu at gcc dot gnu dot org wrote:
> Do you mean we should not use VA_ARGS in GCC? Then, what? static inline? Is
> this warned by -pedantic? Shouldn't it?
Variadic macros are not standard C90 or C++98 and should only be used
*conditionally* if the compiler being used to build GCC supports them.
Otherwise you need to define a function - which in practice won't be
inline (inline variadic functions, passing on their variable arguments to
another variadic function, require GNU extensions that are much more
recent than variadic macros).
I think
#if GCC_VERSION >= 3000 || __STDC_VERSION__ >= 199901L
is a suitable condition for support of variadic macros.
Because these macros may be used *conditionally*, GCC is built with
-Wno-variadic-macros.
For the cases that are inserting UNKNOWN_LOCATION, I'd suggest just
changing all the call sites of the macro to pass UNKNOWN_LOCATION
explicitly, and removing the macro. That should deal with build_call_expr
and with build_call_nofold in builtins.c.
For the cases in sel-sched-dump.h I'd suggest just using normal variadic
functions that use interfaces such as vfprintf and vasprintf, and not
macros at all.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44426
next prev parent reply other threads:[~2010-06-05 17:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-05 14:24 [Bug bootstrap/44426] New: " jay dot krell at cornell dot edu
2010-06-05 14:54 ` [Bug bootstrap/44426] [4.5/4.6 Regression] " jsm28 at gcc dot gnu dot org
2010-06-05 15:14 ` jay dot krell at cornell dot edu
2010-06-05 15:51 ` manu at gcc dot gnu dot org
2010-06-05 17:37 ` joseph at codesourcery dot com [this message]
2010-06-05 17:40 ` [Bug bootstrap/44426] [4.4/4.5/4.6 " jsm28 at gcc dot gnu dot org
2010-06-05 17:52 ` rguenth at gcc dot gnu dot org
2010-06-05 19:05 ` manu at gcc dot gnu dot org
2010-06-05 19:10 ` rguenth at gcc dot gnu dot org
2010-06-05 19:39 ` manu at gcc dot gnu dot org
2010-06-05 21:33 ` joseph at codesourcery dot com
2010-06-14 8:55 ` jakub at gcc dot gnu dot org
2010-06-14 10:20 ` jakub at gcc dot gnu dot org
2010-06-14 15:54 ` jakub at gcc dot gnu dot org
2010-06-14 16:01 ` jakub at gcc dot gnu dot org
2010-06-21 16:27 ` jakub at gcc dot gnu dot org
2010-06-21 17:07 ` jakub at gcc dot gnu dot org
2010-06-21 17:11 ` jakub at gcc dot gnu dot org
2010-06-21 17:20 ` jakub at gcc dot gnu dot org
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=20100605173656.4699.qmail@sourceware.org \
--to=gcc-bugzilla@gcc.gnu.org \
--cc=gcc-bugs@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).