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

--- Comment #9 from Tom Tromey <tromey at gcc dot gnu.org> ---
> 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.

I hesitate to say I'm sure :)

However my belief is that because this class has a user-provided
default constructor, it is not trivial.

I tested this by adding "#include <type_traits>" and then

static_assert(!std::is_trivial<ConstUTF8CharsZ>::value, "whoops");


Trivial or not, I'd like to get a warning here.  In firefox varargs
is really only used for printf-like things; but for various reasons
there are some custom implementations which can't be marked
with the "printf" attribute.  So while doing a refactoring it turned
out I inadvertently changed code to pass objects rather than char*
to one of these ... but finding the problem locations is proving
to be rather difficult.

Reply via email to