This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/47040] New: Make error message for empty array constructor more helpful/correct


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."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]