mal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: pawel.wrobel at nielsen dot com
Target Milestone: ---
Hello,
I have the question regarding the following behaviour of gcc 8.3 (it behaves
the same way from version 5.0 up to 8.3 - w
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90005
--- Comment #2 from Pawel ---
Hi,
Thanks,
Adding -Wformat indeed show up a waring here :
$ g++ -Wformat main.cpp -o out
main.cpp: In function ‘int main()’:
main.cpp:6:30: warning: format ‘%s’ expects argument of type ‘char*’, but
argument 2
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90005
--- Comment #6 from Pawel ---
Hi,
Thanks for the explanation. Indeed, for example, the clang does not support the
non-POD(ex. std::string) to variadic function - as :
error: cannot pass non-trivial object of type 'std::__cxx11::string' (aka
'ba
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90005
--- Comment #7 from Pawel ---
The "-Werror=format" solution seems to work for me - it triggers the error here
(missing .c_str()) even for the gcc >= 5.0 - leaving all the other, non-related
warnings untouched.
Thanks
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90005
--- Comment #9 from Pawel ---
Hello Eric,
Thank You so much for this answer - in our case that turned out also to be
really useful.
We took the "-Werror=conditionally-supported" version - to trigger an error in
our custom variadic function - as