[Bug c++/90005] No error produced for the wrong type of string used in gcc >= 5.0

2019-04-10 Thread pawel.wrobel at nielsen dot com
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

[Bug c++/90005] No error produced for the wrong type of string used in gcc >= 5.0

2019-04-08 Thread pawel.wrobel at nielsen dot com
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

[Bug c++/90005] No error produced for the wrong type of string used in gcc >= 5.0

2019-04-08 Thread pawel.wrobel at nielsen dot com
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

[Bug c++/90005] No error produced for the wrong type of string used in gcc >= 5.0

2019-04-08 Thread pawel.wrobel at nielsen dot com
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

[Bug c++/90005] New: No error produced for the wrong type of string used in gcc >= 5.0

2019-04-08 Thread pawel.wrobel at nielsen dot com
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