This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/60304] Including <atomic> disables -Wconversion-null


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;}

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]