public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/60304] Including <atomic> disables -Wconversion-null
Date: Fri, 24 Oct 2014 14:51:00 -0000	[thread overview]
Message-ID: <bug-60304-4-9SFVlwqk4m@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-60304-4@http.gcc.gnu.org/bugzilla/>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="UTF-8", Size: 3619 bytes --]

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

--- Comment #21 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Manuel López-Ibáñez from comment #19) 
> This is exactly what G++'s stdbool.h is doing with -std=gnu++98 and
> -std=c++98.

<stdbool.h> is a "header" which is C++ standardese for a standard library
header. The rule only applies to user code, not std::lib headers. In your
testcase sys.h is OK but nonsys.h is not.

Although you can argue that since <stdbool.h> is not defined by the C++98
standard it is not a "header" and must not define the macro in __STRICT_ANSI__
mode.

> (Also, why is this not an error with -std=c++11 -pedantic-errors?)

Because noone has ever implemented the diagnostic. Note that it only applies to
user-code that includes a "header" so it's OK to define macros using the names
of keywords as long as you never include a standard header. That makes it a bit
more complicated to implement the diagnostic.
>From gcc-bugs-return-464931-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org Fri Oct 24 14:51:36 2014
Return-Path: <gcc-bugs-return-464931-listarch-gcc-bugs=gcc.gnu.org@gcc.gnu.org>
Delivered-To: listarch-gcc-bugs@gcc.gnu.org
Received: (qmail 26415 invoked by alias); 24 Oct 2014 14:51:36 -0000
Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm
Precedence: bulk
List-Id: <gcc-bugs.gcc.gnu.org>
List-Archive: <http://gcc.gnu.org/ml/gcc-bugs/>
List-Post: <mailto:gcc-bugs@gcc.gnu.org>
List-Help: <mailto:gcc-bugs-help@gcc.gnu.org>
Sender: gcc-bugs-owner@gcc.gnu.org
Delivered-To: mailing list gcc-bugs@gcc.gnu.org
Received: (qmail 26360 invoked by uid 48); 24 Oct 2014 14:51:33 -0000
From: "y.gribov at samsung dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug sanitizer/63638] [4.9 Regression] internal compiler error: in asan_expand_check_ifn (with -fsanitize­dress)
Date: Fri, 24 Oct 2014 14:58:00 -0000
X-Bugzilla-Reason: CC
X-Bugzilla-Type: changed
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: gcc
X-Bugzilla-Component: sanitizer
X-Bugzilla-Version: 4.9.2
X-Bugzilla-Keywords: ice-on-valid-code
X-Bugzilla-Severity: normal
X-Bugzilla-Who: y.gribov at samsung dot com
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Priority: P3
X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: cc attachments.created
Message-ID: <bug-63638-4-OeWaGieiqi@http.gcc.gnu.org/bugzilla/>
In-Reply-To: <bug-63638-4@http.gcc.gnu.org/bugzilla/>
References: <bug-63638-4@http.gcc.gnu.org/bugzilla/>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/
Auto-Submitted: auto-generated
MIME-Version: 1.0
X-SW-Source: 2014-10/txt/msg01952.txt.bz2
Content-length: 760

https://gcc.gnu.org/bugzilla/show_bug.cgi?idc638

Yury Gribov <y.gribov at samsung dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |y.gribov at samsung dot com

--- Comment #1 from Yury Gribov <y.gribov at samsung dot com> ---
Created attachment 33803
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id3803&actioníit
Proposed patch

Thanks, I was aware of this problem. For GCC 5.0 Maxim is going to fix this
with his dont-sanitize-builtins patch (currently reviewed in gcc-patches). Here
is a trivial patch for 4.9 but I only had time to perform short regtesting
(make check RUNTESTFLAGS=asan.exp).


  parent reply	other threads:[~2014-10-24 14:35 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-21 15:59 [Bug preprocessor/60304] New: " bug-reports at psdtechnologies dot com
2014-02-21 18:24 ` [Bug preprocessor/60304] " harald at gigawatt dot nl
2014-10-24  9:05 ` [Bug c++/60304] " paolo.carlini at oracle dot com
2014-10-24  9:29 ` paolo.carlini at oracle dot com
2014-10-24  9:35 ` redi at gcc dot gnu.org
2014-10-24  9:44 ` paolo.carlini at oracle dot com
2014-10-24  9:51 ` redi at gcc dot gnu.org
2014-10-24 11:33 ` paolo.carlini at oracle dot com
2014-10-24 12:01 ` redi at gcc dot gnu.org
2014-10-24 12:27 ` jakub at gcc dot gnu.org
2014-10-24 13:19 ` redi at gcc dot gnu.org
2014-10-24 13:23 ` manu at gcc dot gnu.org
2014-10-24 13:49 ` manu at gcc dot gnu.org
2014-10-24 14:51 ` redi at gcc dot gnu.org [this message]
2014-10-24 16:20 ` manu at gcc dot gnu.org
2020-09-02 15:32 ` [Bug c++/60304] Including <stdbool.h> disables -Wconversion-null in C++ 98 mode redi at gcc dot gnu.org
2020-09-02 15:58 ` redi at gcc dot gnu.org
2020-09-02 16:03 ` redi at gcc dot gnu.org
2020-09-02 19:50 ` cvs-commit at gcc dot gnu.org
2020-09-02 19:52 ` redi at gcc dot gnu.org
2020-09-05 11:13 ` harald at gigawatt dot nl
2020-09-05 12:12 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-60304-4-9SFVlwqk4m@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).