public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "eldlistmailingz at tropicsoft dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/65547] Gcc not giving preprocessor error for invalid invocation of variadic macro
Date: Wed, 25 Mar 2015 22:53:00 -0000	[thread overview]
Message-ID: <bug-65547-4-L2K00GqOVn@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-65547-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65547

--- Comment #6 from Edward Diener <eldlistmailingz at tropicsoft dot com> ---
(In reply to Jonathan Wakely from comment #4)
> (In reply to Edward Diener from comment #3)
> > Where do you get the idea that the standard doesn't require an error, it
> > requires a diagnostic message ?
> 
> 1.4 [intro.compliance], the text I quoted. Where do you get the idea it
> requires an error?

You are not following the C++ standard as specified by the section I quoted.
Does gcc just decide arbitrarily if it does not follow the C++ standard it can
either issue an error, warning, or diagnostic message. That is an odd way to
create a language compiler. Is not the idea of a compiler like gcc that it
should follow the C++ standard as to be a standard-conforming compiler, and if
the end-user writes C++ code that does not follow the C++ standard an error
should be issued by the compiler ?

I am clearly missing something here. The C++ standard, in the section/paragraph
I quoted, is saying that when a macro accepts variadic parameters as its final
parameter, some input, even if it is an argument consisting of no preprocessing
tokens, must be passed for the variadic parameter. In the example I gave, no
argument at all is being passed for the variadic parameter. If the invocation
had been VMACRO(1,) then there is no problem. But some argument must be passed.


      parent reply	other threads:[~2015-03-25 21:45 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  3:51 [Bug c++/65547] New: " eldlistmailingz at tropicsoft dot com
2015-03-25  3:52 ` [Bug c++/65547] " pinskia at gcc dot gnu.org
2015-03-25 11:46 ` redi at gcc dot gnu.org
2015-03-25 12:22 ` eldlistmailingz at tropicsoft dot com
2015-03-25 12:55 ` redi at gcc dot gnu.org
2015-03-25 22:53 ` eldlistmailingz at tropicsoft dot com [this message]

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=bug-65547-4-L2K00GqOVn@http.gcc.gnu.org/bugzilla/ \
    --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).