This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/60304] Including <atomic> disables -Wconversion-null
- From: "manu at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 24 Oct 2014 13:19:43 +0000
- Subject: [Bug c++/60304] Including <atomic> disables -Wconversion-null
- Auto-submitted: auto-generated
- References: <bug-60304-4 at http dot gcc dot gnu dot org/bugzilla/>
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;}