public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: Toshi Morita <tm2@best.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org Subject: Re: c/2591: variable expression erroneously allowed to dimension array Date: Thu, 19 Apr 2001 16:06:00 -0000 [thread overview] Message-ID: <20010419230601.5623.qmail@sourceware.cygnus.com> (raw) The following reply was made to PR c/2591; it has been noted by GNATS. From: Toshi Morita <tm2@best.com> To: allen.everhart@marcgs.com Cc: gcc-gnats@gcc.gnu.org Subject: Re: c/2591: variable expression erroneously allowed to dimension array Date: Thu, 19 Apr 2001 15:58:21 -0700 (PDT) > > >Number: 2591 > >Category: c > >Synopsis: variable expression erroneously allowed to dimension array > >Confidential: no > >Severity: serious > >Priority: high > >Responsible: unassigned > >State: open > >Class: accepts-illegal > >Submitter-Id: net > >Arrival-Date: Thu Apr 19 14:26:00 PDT 2001 > >Closed-Date: > >Last-Modified: > >Originator: Allen Everhart > >Release: gcc version 2.8.1 ... > int printf( char *, ... ) ; > int i=1 ; > > int main() > { > char buff[i] ; /* variable expression allowed to dimension array */ > > buff[0] = 'f' ; > buff[1] = 'o' ; > buff[2] = 'o' ; > buff[3] = '\0' ; > return printf( "%s %d\n", buff, sizeof(buff) ) ; > } This is a GNU C extension. If you want to disable GNU C extensions, you should use -pedantic -ansi, I believe. Toshi
next reply other threads:[~2001-04-19 16:06 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2001-04-19 16:06 Toshi Morita [this message] -- strict thread matches above, loose matches on Subject: below -- 2001-04-19 14:26 allen.everhart
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=20010419230601.5623.qmail@sourceware.cygnus.com \ --to=tm2@best.com \ --cc=gcc-prs@gcc.gnu.org \ --cc=nobody@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: linkBe 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).