Bug 24507 - Compiler error from variable-size type
Summary: Compiler error from variable-size type
Status: CLOSED RAWHIDE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 7.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: David Lawrence
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-01-21 16:35 UTC by Alex Selby
Modified: 2007-04-18 16:30 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-01-21 18:31:19 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Alex Selby 2001-01-21 16:35:07 UTC
Compiling this

int inv(int n,char mm[n][n]);
int inv(int n,char mm[n][n]){}

using gcc-2.96-69 and the command

gcc -c zog.c

gives this output

zog.c:2: variable-size type declared outside of any function
zog.c:2: variable-size type declared outside of any function

If you remove the first line (the prototype line) then it will compile
OK (It is exactly the same as one of the examples given in "info gcc"
--> C Extensions --> Variable Length). 

Also it compiles OK with earlier gcc's such as kgcc.

Comment 1 Jakub Jelinek 2001-01-21 18:31:15 UTC
Verified both in 2.96-71 and current FSF CVS head.
Will jump onto it in the coming week.

Comment 2 Jakub Jelinek 2001-02-05 21:08:30 UTC
Fixed in gcc-2.96-74.


Note You need to log in before you can comment on or make changes to this bug.