public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/19291] Warning "cannot pass objects of non-POD type" should be an error
Date: Thu, 13 Aug 2009 10:31:00 -0000	[thread overview]
Message-ID: <20090813103111.27682.qmail@sourceware.org> (raw)
In-Reply-To: <bug-19291-3328@http.gcc.gnu.org/bugzilla/>



------- Comment #4 from redi at gcc dot gnu dot org  2009-08-13 10:31 -------
(In reply to comment #1)
> It cannot be as it is only undefined behavior and the C++ (and C standard by the way) says that 
> undefined behavior cannot be an error only a warning.

I don't know about C, but C++ says:

"permissible undefined behavior ranges from ignoring the situation completely
with unpredictable results, to behaving during translation or program execution
in a documented manner characteristic of the environment (with or without
the issuance of a diagnostic message), to terminating a translation or
execution (with the issuance of a diagnostic message)." [defns.undefined]

So it is permissible to terminate translation and issue a diagnostic.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19291


  parent reply	other threads:[~2009-08-13 10:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-19291-3328@http.gcc.gnu.org/bugzilla/>
2005-10-20 10:25 ` faure at kde dot org
2009-08-13  4:03 ` wallaces3 at yahoo dot com
2009-08-13 10:31 ` redi at gcc dot gnu dot org [this message]
2009-08-13 12:24 ` joseph at codesourcery dot com
2009-08-13 12:51 ` redi at gcc dot gnu dot org
2009-08-21 16:51 ` redi at gcc dot gnu dot org
2010-04-15 18:09 ` manu at gcc dot gnu dot org
2010-04-15 18:09 ` manu at gcc dot gnu dot org
2005-01-06 13:48 [Bug c++/19291] New: " loose at astron dot nl
2005-01-06 14:04 ` [Bug c++/19291] " pinskia 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=20090813103111.27682.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).