aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface
diff options
context:
space:
mode:
authorMarek Polacek <polacek@redhat.com>2022-07-05 14:22:26 -0400
committerMarek Polacek <polacek@redhat.com>2022-07-05 15:15:14 -0400
commit543828e79bfa63ef26b11a2c9ea81fd7905f33aa (patch)
treedc578a728aeb97650d8846d67f3deb09408b6375 /gcc/ada/gcc-interface
parent1d2aa262482fc9b23201200ca82aa3b8659b072e (diff)
downloadgcc-543828e79bfa63ef26b11a2c9ea81fd7905f33aa.zip
gcc-543828e79bfa63ef26b11a2c9ea81fd7905f33aa.tar.gz
gcc-543828e79bfa63ef26b11a2c9ea81fd7905f33aa.tar.bz2
c-family: Prevent -Wformat warnings with u8 strings [PR105626]
The <https://gcc.gnu.org/pipermail/gcc/2022-May/238679.html> thread seems to have concluded that -Wformat shouldn't warn about printf((const char*) u8"test %d\n", 1); saying "format string is not an array of type 'char'". This code is not an aliasing violation, and there are no I/O functions for u8 strings, so the const char * cast is OK and shouldn't be disregarded. PR c++/105626 gcc/c-family/ChangeLog: * c-format.cc (check_format_arg): Don't emit -Wformat warnings with u8 strings. gcc/testsuite/ChangeLog: * g++.dg/warn/Wformat-char8_t-1.C: New test.
Diffstat (limited to 'gcc/ada/gcc-interface')
0 files changed, 0 insertions, 0 deletions