public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
@ 2011-09-29 16:25 ` paolo.carlini at oracle dot com
  2011-09-29 16:27 ` redi at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29 16:25 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |manu at gcc dot gnu.org

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 16:03:15 UTC ---
Manuel, do you have an opinion about this rather old issue? In the meanwhile,
the warning became an hard error, when it applies. Thus the original testcase
is just accepted, and this variant:

void f(...);

struct X {
  X();
  X(const X&);
};

void g() {
    X x;
    f(x);
}

gives:

40202.C: In function ‘void g()’:
40202.C:10:8: error: cannot pass objects of non-trivially-copyable type ‘struct
X’ through ‘...’

ICC warns exactly at the same line, 10, and nothing else.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
  2011-09-29 16:25 ` [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called paolo.carlini at oracle dot com
@ 2011-09-29 16:27 ` redi at gcc dot gnu.org
  2011-09-29 17:32 ` paolo.carlini at oracle dot com
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-09-29 16:27 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-29 16:16:48 UTC ---
(In reply to comment #4)
> In the meanwhile,
> the warning became an hard error, when it applies.

It went from "undefined" to "conditionally-supported" behaviour in C++11

> ICC warns exactly at the same line, 10, and nothing else.

Clang too.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
  2011-09-29 16:25 ` [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called paolo.carlini at oracle dot com
  2011-09-29 16:27 ` redi at gcc dot gnu.org
@ 2011-09-29 17:32 ` paolo.carlini at oracle dot com
  2011-09-29 17:35 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29 17:32 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|gcc-bugs at gcc dot gnu.org |

--- Comment #6 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 17:14:56 UTC ---
Thanks Jon for the clarification about C++11. Thus, let's wait a bit more in
case Manuel has further comments, otherwise, let's just close this.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2011-09-29 17:32 ` paolo.carlini at oracle dot com
@ 2011-09-29 17:35 ` redi at gcc dot gnu.org
  2011-09-29 21:08 ` manu at gcc dot gnu.org
  2011-09-29 22:20 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2011-09-29 17:35 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from Jonathan Wakely <redi at gcc dot gnu.org> 2011-09-29 17:26:57 UTC ---
To the OP, you've probably fixed it by now, but you must have a varargs
function with ... somewhere, or you wouldn't get the error. You could add a
conflicting declaration which would make the compiler tell you the location.

void f(...);

struct X {
    X();
};

struct Unique;
Unique* f(...);

void g() {
    X x;
    f(x);
}

t.cc:8: error: new declaration 'Unique* f(...)'
t.cc:1: error: ambiguates old declaration 'void f(...)'

Now you know where your mystery f(...) came from.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2011-09-29 17:35 ` redi at gcc dot gnu.org
@ 2011-09-29 21:08 ` manu at gcc dot gnu.org
  2011-09-29 22:20 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: manu at gcc dot gnu.org @ 2011-09-29 21:08 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #8 from Manuel López-Ibáñez <manu at gcc dot gnu.org> 2011-09-29 20:54:46 UTC ---
(In reply to comment #4)
> Manuel, do you have an opinion about this rather old issue? In the meanwhile,
> the warning became an hard error, when it applies. Thus the original testcase
> is just accepted, and this variant:

Paolo, thanks for asking my opinion! As a user, I would appreciate an extra
inform saying where the variadic function is declared, like g++ does for other
diagnostics. But since I don't know how hard is to get that location at the
error point, and I am not volunteering to do the work...

BTW, I think it is great that you are triaging and fixing so many C++
diagnostic bugs, it was sorely needed.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called
       [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2011-09-29 21:08 ` manu at gcc dot gnu.org
@ 2011-09-29 22:20 ` paolo.carlini at oracle dot com
  5 siblings, 0 replies; 7+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-29 22:20 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID

--- Comment #9 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-29 21:08:12 UTC ---
You are welcome ;) I'm sure the diagnostics could be improved, in this case
too, but given that we do behave exactly like the two other top class
front-ends, and also given the amount of work required to make progress on
other issues, I'm glad you agree we can consider the current status good
enough.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug c++/40202] warning about passing non-POD objects through ‘...’ should include name and location of declaration being called
  2009-05-19 20:32 [Bug c++/40202] New: warning about passing non-POD objects through ‘...’ " jason dot orendorff at gmail dot com
@ 2009-05-19 22:04 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-05-19 22:04 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from pinskia at gcc dot gnu dot org  2009-05-19 22:04 -------
So are you asking to print out 'x' here? 


-- 

pinskia at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement
           Keywords|                            |diagnostic


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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-09-29 21:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-40202-4@http.gcc.gnu.org/bugzilla/>
2011-09-29 16:25 ` [Bug c++/40202] warning about passing non-POD objects through �...� should include name and location of declaration being called paolo.carlini at oracle dot com
2011-09-29 16:27 ` redi at gcc dot gnu.org
2011-09-29 17:32 ` paolo.carlini at oracle dot com
2011-09-29 17:35 ` redi at gcc dot gnu.org
2011-09-29 21:08 ` manu at gcc dot gnu.org
2011-09-29 22:20 ` paolo.carlini at oracle dot com
2009-05-19 20:32 [Bug c++/40202] New: warning about passing non-POD objects through ‘...’ " jason dot orendorff at gmail dot com
2009-05-19 22:04 ` [Bug c++/40202] " pinskia at gcc dot gnu dot org

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).