On 02/23/2017 05:02 PM, Martin Sebor wrote:
On 02/23/2017 06:51 AM, Stephan Bergmann wrote:
At least with a recent GCC 7 trunk build ("gcc (GCC) 7.0.1 20170221
(experimental)"), I noticed that -Wformat-truncation warnings happen to
not be emitted if and only if -Og is given:
That's
On 02/23/2017 06:51 AM, Stephan Bergmann wrote:
At least with a recent GCC 7 trunk build ("gcc (GCC) 7.0.1 20170221
(experimental)"), I noticed that -Wformat-truncation warnings happen to
not be emitted if and only if -Og is given:
That's unfortunately a bug. The warning runs at different
On 02/23/2017 02:51 PM, Stephan Bergmann wrote:
At least with a recent GCC 7 trunk build ("gcc (GCC) 7.0.1 20170221
(experimental)"), I noticed that -Wformat-truncation warnings happen to
not be emitted if and only if -Og is given:
$ cat test.c
#include
int main() {
char buf[3];
At least with a recent GCC 7 trunk build ("gcc (GCC) 7.0.1 20170221
(experimental)"), I noticed that -Wformat-truncation warnings happen to
not be emitted if and only if -Og is given:
$ cat test.c
#include
int main() {
char buf[3];
snprintf(buf, sizeof buf, "%s", "foo");
return