|
From: | grischka |
Subject: | Re: [Tinycc-devel] _Generic or __builtin_choose_expr |
Date: | Tue, 04 Jul 2017 11:02:39 +0200 |
User-agent: | Thunderbird 2.0.0.23 (Windows/20090812) |
Michael Matz wrote:
First string literals are now always const char, ...
Hm... ;) Actually the behavior with -Wwrite-strings that we had is what gcc has too: typeof("123") cc = "456"; cc[1] = 'x'; printf("%s\n", cc); $ gcc -Wno-write-strings ... 4x6 $ gcc -Wwrite-strings ... error: assignment of read-only location 'cc[1]' (mingw gcc 3.4.2 and 6.3.0) Also, now tcc doesn't warn with this one anymore: const char cc[] = "456"; char *p = cc; --- grischka
[Prev in Thread] | Current Thread | [Next in Thread] |