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

--- Comment #16 from Manuel López-Ibáñez <manu at gcc dot gnu.org> ---
(In reply to Jonathan Wakely from comment #15)
> Yes, that's what the patch I'm testing does.
> 
> IMHO we should only define it for -std=gnu++98 and not any other -std mode,
> but I'll be conservative and leave it defined for -std=c++98 as well.

Thus, the warning also needs fixing. Since the same behavior will occur if the
user directly or indirectly includes stdbool.h.

A testcase:

# 1 "false.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "false.c"
# 1 "sys.h" 1

# 2 "sys.h" 3
# 2 "false.c" 2
int * foo() {return 
# 2 "false.c" 3
                   false
# 2 "false.c"
                        ;}
# 1 "nonsys.h" 1
# 4 "false.c" 2
int * bar() {return false;}

Reply via email to