https://gcc.gnu.org/bugzilla/show_bug.cgi?id=18487

--- Comment #19 from Eric Gallager <egallager at gcc dot gnu.org> ---
(In reply to Dávid Bolvanský from comment #18)
> a.c
> 
> int foo(void) __attribute__((const));
> 
> 
> int main(void) {
>     return foo();
> }
> 
> b.c
> 
> #include <stdio.h>
> 
> int foo(void) {
>     puts("BUM");
>     return 0;
> }
> 
> gcc a.c b.c -Wall -Wextra -flto -o bum
> 
> 
> It would be nice to get a warning.

The LTO case would probably be tougher to get right than the simple case...

Reply via email to