https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213
--- Comment #9 from Raffaello Bertini ---
(In reply to David Malcolm from comment #8)
> I'm not sure I fully grok the example code, but FWIW the analyzer doesn't
> yet "know" about the behavior of strnlen and so conservatively assumes any
> poss
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213
--- Comment #3 from Raffaello Bertini ---
(In reply to Sam James from comment #2)
> I can't reproduce that corrupted output. Did you get that from a CI system
> or something like that?
no i had that from the embedded terminal of the IDE VsCode
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120213
Bug ID: 120213
Summary: analyzer report a false positive
Product: gcc
Version: 15.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
A
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118308
--- Comment #3 from Raffaello Bertini ---
ok thanks for the reply. btw it is enough to enable the warnigs.
```
bool f()
{
printf("f");
}
int main(int argc, char* argv[])
{
if (f())
printf("y");
else
printf("n");
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118308
Bug ID: 118308
Summary: compiling code that should return without a return
statement
Product: gcc
Version: 14.1.0
Status: UNCONFIRMED
Severity: normal
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767
--- Comment #11 from Raffaello Bertini ---
> MyFunc __attribute__((const)) * g_f = my_func;
> instead. Just with the attribute syntax you get an extra warning:
> warning: ‘const’ attribute on function returning ‘void’ [-Wattributes]
That's f
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767
--- Comment #9 from Raffaello Bertini ---
More than to fix something,
it was a suggestion to evolve or add a warning to tell the user that those kind
of statements are basically like not written at all, ignored as the final
result.
so more than
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767
--- Comment #1 from Raffaello Bertini ---
for simplicity sake i am writing here the C sample code:
#include
typedef void MyFunc(void);
const MyFunc my_func;
co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116767
Bug ID: 116767
Summary: C const function pointer no code generated (or
optimized out)
Product: gcc
Version: 14.2.1
Status: UNCONFIRMED
Severity: normal