From: Kamil Iskra <kamil@wins.uva.nl>
To: Jeffrey A Law <law@cygnus.com>
Cc: Falk Hueffner <falk.hueffner@student.uni-tuebingen.de>, gcc@gcc.gnu.org
Subject: Re: Array out of bounds warning
Date: Wed, 02 Aug 2000 14:59:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.10.10008022217510.1359-100000@bubu.home> (raw)
In-Reply-To: <15088.965052644@upchuck>
On Mon, 31 Jul 2000, Jeffrey A Law wrote:
> > int a[10];
> > a[10] = 17;
[snip]
> The next question in my mind is how often do we get false hits on the
> warning.
I've been wondering: what will the proposed patch do for n-dimensional
arrays, say:
int a[10][10];
a[0][10]=17;
I think right now the code will generate a warning, but is this what we
want?
I'm not entirely sure whether the standard does allow such a construction,
but surely it has a well defined meaning, given that the memory layout of
arrays is precisely defined in the standard. I've seen such a code only
yesterday, where it was used for speed reasons, so it's probably not an
uncommon trick.
Regards,
--
/ Kamil Iskra kamil@wins.uva.nl \
| Section Computational Science, Faculty FNWI, Universiteit van Amsterdam |
| tel. +31 20 525 75 35 fax. +31 20 525 74 90 |
\ Kruislaan 403 room F.202 1098 SJ Amsterdam (NL) /
next prev parent reply other threads:[~2000-08-02 14:59 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-07-30 14:16 Falk Hueffner
2000-07-31 7:11 ` Jeffrey A Law
2000-07-31 11:19 ` Falk Hueffner
2000-08-02 14:59 ` Kamil Iskra [this message]
2000-08-02 18:12 ` Geoff Keating
2000-08-03 0:59 ` Kamil Iskra
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=Pine.LNX.4.10.10008022217510.1359-100000@bubu.home \
--to=kamil@wins.uva.nl \
--cc=falk.hueffner@student.uni-tuebingen.de \
--cc=gcc@gcc.gnu.org \
--cc=law@cygnus.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).