public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Basile STARYNKEVITCH <basile@starynkevitch.net>
To: "Peter A. Felvegi" <petschy@praire-chicken.com>
Cc: gcc@gcc.gnu.org
Subject: Re: array subscript is below array bounds : false positive?
Date: Tue, 15 Sep 2009 10:30:00 -0000	[thread overview]
Message-ID: <4AAF6CB6.5010607@starynkevitch.net> (raw)
In-Reply-To: <4AAF6A13.2090303@praire-chicken.com>

Peter A. Felvegi wrote:
> Hello,
> ---->8---->8---->8---->8---->8---->8---->8---->8---->8---->8----
> #define ASSERT(x)    if (x) { } else { __asm__("int $0x03"); }
With the trunk, that is future 4.5, I would suggest
#define ASSERT(x) if (x) {} else {__builtin_unreachable ();}

or at least, if the int$03 is important,

#define ASSERT(x) if (!(x)) \
    { volatile __asm__("int $0x03");__builtin_unreachable ();}

See
http://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html#Other-Builtins

Regards.

-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/
email: basile<at>starynkevitch<dot>net mobile: +33 6 8501 2359
8, rue de la Faiencerie, 92340 Bourg La Reine, France
*** opinions {are only mines, sont seulement les miennes} ***

  reply	other threads:[~2009-09-15 10:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-15 10:19 Peter A. Felvegi
2009-09-15 10:30 ` Basile STARYNKEVITCH [this message]
2009-09-15 14:56 ` Ian Lance Taylor
2009-09-15 16:19   ` Richard Henderson

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=4AAF6CB6.5010607@starynkevitch.net \
    --to=basile@starynkevitch.net \
    --cc=gcc@gcc.gnu.org \
    --cc=petschy@praire-chicken.com \
    /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).