public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/52606] New: Confusing diagnostics for long identifiers
@ 2012-03-16 19:24 anlauf at gmx dot de
  2012-03-16 23:18 ` [Bug fortran/52606] " steven at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: anlauf at gmx dot de @ 2012-03-16 19:24 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52606

             Bug #: 52606
           Summary: Confusing diagnostics for long identifiers
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: anlauf@gmx.de


Excessively long identifiers can produce quite confusing diagnostics.
Perhaps error recovery could be improved.

Example:

module gfcbug118
  implicit none
  interface foo
     module procedure very_long_identifier_beyond_31char
  end interface
contains
  subroutine very_long_identifier_beyond_31char ()
  end subroutine very_long_identifier_beyond_31char
end module gfcbug118

% gfc gfcbug118.f90 -std=f95
gfcbug118.f90:4.54:

     module procedure very_long_identifier_beyond_31char
                                                      1
Error: Name at (1) is too long
gfcbug118.f90:7.45:

  subroutine very_long_identifier_beyond_31char ()
                                             1
Error: Name at (1) is too long
gfcbug118.f90:8.5:

  end subroutine very_long_identifier_beyond_31char
     1
Error: Expecting END MODULE statement at (1)
gfcbug118.f90:9.20:

end module gfcbug118
                    1
Error: Fortran 2008: CONTAINS statement without FUNCTION or SUBROUTINE
statement at (1)


%  gfc gfcbug118.f90 -fmax-identifier-length=31
gfcbug118.f90:4.54:

     module procedure very_long_identifier_beyond_31char
                                                      1
Error: Name at (1) is too long
gfcbug118.f90:7.45:

  subroutine very_long_identifier_beyond_31char ()
                                             1
Error: Name at (1) is too long
gfcbug118.f90:8.5:

  end subroutine very_long_identifier_beyond_31char
     1
Error: Expecting END MODULE statement at (1)


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2013-06-24  6:56 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-16 19:24 [Bug fortran/52606] New: Confusing diagnostics for long identifiers anlauf at gmx dot de
2012-03-16 23:18 ` [Bug fortran/52606] " steven at gcc dot gnu.org
2012-03-16 23:22 ` steven at gcc dot gnu.org
2012-03-17  9:46 ` kargl at gcc dot gnu.org
2012-03-20  8:35 ` jb at gcc dot gnu.org
2012-03-20  9:18 ` burnus at gcc dot gnu.org
2012-03-20 10:53 ` jb at gcc dot gnu.org
2012-03-20 11:04 ` burnus at gcc dot gnu.org
2012-03-21  9:06 ` jb at gcc dot gnu.org
2013-06-24  6:56 ` dominiq at lps dot ens.fr

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