This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/47040] New: Make error message for empty array constructor more helpful/correct
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Wed, 22 Dec 2010 10:06:35 +0000
- Subject: [Bug fortran/47040] New: Make error message for empty array constructor more helpful/correct
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47040
Summary: Make error message for empty array constructor more
helpful/correct
Product: gcc
Version: 4.6.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: burnus@gcc.gnu.org
Found at
http://groups.google.com/group/comp.lang.fortran/browse_thread/thread/3f6348b03eaed435
The error message:
call print( [ ] )
1
Error: Empty array constructor at (1) is not allowed
is misleading at only empty array constructors without typespec are invalid.
Thus, the following is valid:
call print( [ real :: ] )
Expect: Error message:
"Error: Empty array constructor at (1) is not allowed without type-spec"
or
"Error: Empty array constructor without type-spec at (1) is not allowed"
F2008:
R468 array-constructor is (/ ac-spec /)
or lbracket ac-spec rbracket
R469 ac-spec is type-spec ::
or [type-spec ::] ac-value-list
"An empty sequence forms a zero-sized array."