public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "pinskia at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/64867] warning for passing non-POD to varargs function
Date: Fri, 30 Jan 2015 17:23:00 -0000	[thread overview]
Message-ID: <bug-64867-4-AVnfFfHHRT@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64867-4@http.gcc.gnu.org/bugzilla/>

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

--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Tom Tromey from comment #5)
> (In reply to Jason Merrill from comment #3)
> > Passing a non-POD to a varargs function is conditionally-supported, with
> > implementation-defined semantics.  In GCC 5 it's supported and treated like
> > normal pass-by-value.  You can get a diagnostic about it with
> > -Wconditionally-supported.
> 
> I tried this today and it does not work with the test case in comment #4.
> 
> pokyo. gcc --version
> gcc (GCC) 5.0.0 20150129 (experimental)
> Copyright (C) 2015 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> pokyo. g++ --std=c++11 --syntax-only -Wall -Wconditionally-supported q.cc
> pokyo.

Are you sure that class is not trivial which is why gcc is not warning about
it?  C++11 does not really have pod and non-pod any more but rather trivial and
non-trivial and the rules has chnaged with respect of constructures.


  parent reply	other threads:[~2015-01-30 17:23 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-29 17:38 [Bug c++/64867] New: " tromey at gcc dot gnu.org
2015-01-29 18:28 ` [Bug c++/64867] " pinskia at gcc dot gnu.org
2015-01-29 18:30 ` redi at gcc dot gnu.org
2015-01-29 18:31 ` jason at gcc dot gnu.org
2015-01-29 20:45 ` tromey at gcc dot gnu.org
2015-01-30 17:04 ` tromey at gcc dot gnu.org
2015-01-30 17:12 ` tromey at gcc dot gnu.org
2015-01-30 17:23 ` pinskia at gcc dot gnu.org [this message]
2015-01-30 17:26 ` pinskia at gcc dot gnu.org
2015-01-30 17:40 ` tromey at gcc dot gnu.org
2015-01-31  2:37 ` redi at gcc dot gnu.org
2015-02-02 19:38 ` tromey at gcc dot gnu.org
2017-09-05 14:11 ` rsandifo at gcc dot gnu.org
2021-09-03 18:17 ` [Bug c++/64867] split warning for passing non-POD to varargs function from -Wconditionally-supported into new warning flag, -Wnon-pod-varargs dcb314 at hotmail dot com
2022-12-05 15:05 ` jason at gcc dot gnu.org
2022-12-19 15:56 ` cvs-commit at gcc dot gnu.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=bug-64867-4-AVnfFfHHRT@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).