[Bug c++/40202] warning about passing non-POD objects through �?=...=?UTF-8?Q?� should include name and location of declaration being called

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Thu Sep 29 17:35:00 GMT 2011


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.



More information about the Gcc-bugs mailing list