On Mai 09 2022, Florian Weimer via Gcc wrote:
> * Ulrich Drepper via Gcc:
>
>> t.cc: In function ‘int main()’:
>> t.cc:5:24: warning: format string is not an array of type ‘char’ [-Wformat=]
>> 5 | printf((const char*) u8"test %d\n", 1);
>> |^
>
> Th
On Mon, May 9, 2022 at 11:26 AM Florian Weimer wrote:
> On the other hand, that cast is still quite ugly.
Yes, there aren't yet any I/O functions defined for char8_t and therefore
that's the best we can do right now. I have all kinds of ugly macros to
high these casts.
> All string-related
>
Hi Bryan!
Thanks for reaching out, and welcome to GCC!
On 2022-05-03T13:34:13-0500, Bryan Carroll via Gcc wrote:
> I know I'm too late for GSoC, but if Tobias Burnus or someone wants to
> mentor me, I'm willing to work on the Fortran - Do Concurrent project, as a
> volunteer, if it's not already
* Ulrich Drepper via Gcc:
> t.cc: In function ‘int main()’:
> t.cc:5:24: warning: format string is not an array of type ‘char’ [-Wformat=]
> 5 | printf((const char*) u8"test %d\n", 1);
> |^
This is not an aliasing violation because of the exception
I have a C++20+ code base which forces the program to run using an UTF-8
locale and then uses u8"" strings internally. This causes warnings with
-Wformat.
#include
int main()
{
printf((const char*) u8"test %d\n", 1);
return 0;
}
Compile with
g++ -std=gnu++20 -c -O -Wall t.cc
and you'll