public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/50252] New: Error message on "call x%y" (x not declared) can be more informative
@ 2011-08-31 14:37 arjen.markus895 at gmail dot com
  2011-08-31 19:49 ` [Bug fortran/50252] [OOP] " janus at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: arjen.markus895 at gmail dot com @ 2011-08-31 14:37 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50252
           Summary: Error message on "call x%y" (x not declared) can be
                    more informative
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: arjen.markus895@gmail.com


If you forget to declare a variable with type-bound procedures, say x,
and call one of the intended procedures anyway, the message is simply
that there was a syntax error.

The program:


program test123

    call bb%print

end program test123


results in the following error message:


xx.f90:3.11:

    call x%print
           1
Error: Syntax error in CALL statement at (1)

This message could be made clearer by pointing out that a variable
may not be declared - if the statement contains a %:

Error: Syntax error in CALL statement at (1). Possibly a variable has not been
declared.


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

end of thread, other threads:[~2014-01-07  8:15 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-31 14:37 [Bug fortran/50252] New: Error message on "call x%y" (x not declared) can be more informative arjen.markus895 at gmail dot com
2011-08-31 19:49 ` [Bug fortran/50252] [OOP] " janus at gcc dot gnu.org
2011-08-31 19:59 ` janus at gcc dot gnu.org
2011-09-01  7:18 ` arjen.markus895 at gmail dot com
2011-09-01 11:28 ` janus at gcc dot gnu.org
2014-01-07  8:15 ` 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).