public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
@ 2007-11-08 17:59 ` fxcoudert at gcc dot gnu dot org
  2009-04-11 13:58 ` domob at gcc dot gnu dot org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: fxcoudert at gcc dot gnu dot org @ 2007-11-08 17:59 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from fxcoudert at gcc dot gnu dot org  2007-11-08 17:59 -------
I'm not sure about the wording, but the following patch does what you want:

Index: interface.c
===================================================================
--- interface.c (revision 129869)
+++ interface.c (working copy)
@@ -2216,12 +2216,16 @@ check_intents (gfc_formal_arglist *f, gf
 void
 gfc_procedure_use (gfc_symbol *sym, gfc_actual_arglist **ap, locus *where)
 {
-
-  /* Warn about calls with an implicit interface.  */
+  /* Warn about calls with an implicit interface, or to procedures not
+     explicitly declared.  */
   if (gfc_option.warn_implicit_interface
       && sym->attr.if_source == IFSRC_UNKNOWN)
     gfc_warning ("Procedure '%s' called with an implicit interface at %L",
                 sym->name, where);
+  else if (gfc_option.warn_implicit_procedure && sym->attr.proc ==
PROC_UNKNOWN
+          && sym->attr.if_source == IFSRC_UNKNOWN)
+    gfc_warning ("Procedure '%s' called at %L is not explicitly declared",
+                sym->name, where);

   if (sym->attr.if_source == IFSRC_UNKNOWN
       || !compare_actual_formal (ap, sym->formal, 0,


You also need to add the option in lang.opt and gfortran.h, and handle it in
options.c, of course ;-)


-- 

fxcoudert at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fxcoudert at gcc dot gnu dot
                   |                            |org
           Keywords|                            |patch
   Last reconfirmed|2005-12-30 19:42:48         |2007-11-08 17:59:32
               date|                            |


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
  2007-11-08 17:59 ` [Bug fortran/22552] Would like warning when an undeclared function is called fxcoudert at gcc dot gnu dot org
@ 2009-04-11 13:58 ` domob at gcc dot gnu dot org
  2009-04-11 16:14 ` domob at gcc dot gnu dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-04-11 13:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from domob at gcc dot gnu dot org  2009-04-11 13:58 -------
Working on updating and working out FX's patch.


-- 

domob at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |domob at gcc dot gnu dot org
                   |dot org                     |
             Status|NEW                         |ASSIGNED
   Last reconfirmed|2007-11-08 17:59:32         |2009-04-11 13:58:04
               date|                            |


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
  2007-11-08 17:59 ` [Bug fortran/22552] Would like warning when an undeclared function is called fxcoudert at gcc dot gnu dot org
  2009-04-11 13:58 ` domob at gcc dot gnu dot org
@ 2009-04-11 16:14 ` domob at gcc dot gnu dot org
  2009-05-14 13:49 ` domob at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-04-11 16:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from domob at gcc dot gnu dot org  2009-04-11 16:14 -------
Extended patch based on the one from comment #2 posted:
http://gcc.gnu.org/ml/fortran/2009-04/msg00148.html


-- 


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2009-05-14 13:49 ` domob at gcc dot gnu dot org
@ 2009-05-14 13:49 ` domob at gcc dot gnu dot org
  2009-12-11 14:43 ` dfranke at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-05-14 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from domob at gcc dot gnu dot org  2009-05-14 13:48 -------
Created an attachment (id=17865)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17865&action=view)
Latest patch


-- 


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2009-04-11 16:14 ` domob at gcc dot gnu dot org
@ 2009-05-14 13:49 ` domob at gcc dot gnu dot org
  2009-05-14 13:49 ` domob at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-05-14 13:49 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from domob at gcc dot gnu dot org  2009-05-14 13:49 -------
Created an attachment (id=17866)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17866&action=view)
ChangeLog for patch posted


-- 


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2009-05-14 13:49 ` domob at gcc dot gnu dot org
@ 2009-12-11 14:43 ` dfranke at gcc dot gnu dot org
  2009-12-11 14:58 ` domob at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: dfranke at gcc dot gnu dot org @ 2009-12-11 14:43 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from dfranke at gcc dot gnu dot org  2009-12-11 14:42 -------
Daniel, is there anything going to happen with those patches you attached? :)


-- 

dfranke at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dfranke at gcc dot gnu dot
                   |                            |org


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2009-12-11 14:43 ` dfranke at gcc dot gnu dot org
@ 2009-12-11 14:58 ` domob at gcc dot gnu dot org
  2009-12-27  9:31 ` domob at gcc dot gnu dot org
  2009-12-27  9:33 ` domob at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-12-11 14:58 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from domob at gcc dot gnu dot org  2009-12-11 14:58 -------
Well, on 10th of August I posted this to the mailing list to get comments about
what to do with this PR and some other.  I did so far never get any replies :) 
So actually I'd like to work things out here and either fix or close the PR. 
But I've no real plan at the moment because I'd like to get other's opinions.

The patch itself seems fine to me, the point is whether we want that warning or
not.


-- 


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (6 preceding siblings ...)
  2009-12-11 14:58 ` domob at gcc dot gnu dot org
@ 2009-12-27  9:31 ` domob at gcc dot gnu dot org
  2009-12-27  9:33 ` domob at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-12-27  9:31 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #9 from domob at gcc dot gnu dot org  2009-12-27 09:31 -------
Subject: Bug 22552

Author: domob
Date: Sun Dec 27 09:30:57 2009
New Revision: 155479

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155479
Log:
2009-12-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Daniel Kraft  <d@domob.eu>

        PR fortran/22552
        * lang.opt (Wimplicit-procedure): New option.
        * gfortran.h (struct gfc_option_t): New member
`warn_implicit_procedure'
        * options.c (gfc_handle_option): Handle -Wimplicit-procedure.
        * interface.c (gfc_procedure_use): Warn about procedure never
        explicitly declared if requested by the new flag.
        * invoke.texi: Document new flag -Wimplicit-procedure.

2009-12-27  Francois-Xavier Coudert  <fxcoudert@gcc.gnu.org>
            Daniel Kraft  <d@domob.eu>

        PR fortran/22552
        * gfortran.dg/warn_implicit_procedure_1.f90: New test.

Added:
    trunk/gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f90
Modified:
    trunk/gcc/fortran/ChangeLog
    trunk/gcc/fortran/gfortran.h
    trunk/gcc/fortran/interface.c
    trunk/gcc/fortran/invoke.texi
    trunk/gcc/fortran/lang.opt
    trunk/gcc/fortran/options.c
    trunk/gcc/testsuite/ChangeLog


-- 


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
       [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
                   ` (7 preceding siblings ...)
  2009-12-27  9:31 ` domob at gcc dot gnu dot org
@ 2009-12-27  9:33 ` domob at gcc dot gnu dot org
  8 siblings, 0 replies; 10+ messages in thread
From: domob at gcc dot gnu dot org @ 2009-12-27  9:33 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #10 from domob at gcc dot gnu dot org  2009-12-27 09:33 -------
Implemented on trunk with (basically) the patch attached.


-- 

domob at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED


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


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

* [Bug fortran/22552] Would like warning when an undeclared function is called
  2005-07-18 19:08 [Bug fortran/22552] New: " schnetter at aei dot mpg dot de
@ 2005-07-19 13:43 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-07-19 13:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-07-19 13:43 -------
Confirmed.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-07-19 13:43:48
               date|                            |


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


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

end of thread, other threads:[~2009-12-27  9:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-22552-7427@http.gcc.gnu.org/bugzilla/>
2007-11-08 17:59 ` [Bug fortran/22552] Would like warning when an undeclared function is called fxcoudert at gcc dot gnu dot org
2009-04-11 13:58 ` domob at gcc dot gnu dot org
2009-04-11 16:14 ` domob at gcc dot gnu dot org
2009-05-14 13:49 ` domob at gcc dot gnu dot org
2009-05-14 13:49 ` domob at gcc dot gnu dot org
2009-12-11 14:43 ` dfranke at gcc dot gnu dot org
2009-12-11 14:58 ` domob at gcc dot gnu dot org
2009-12-27  9:31 ` domob at gcc dot gnu dot org
2009-12-27  9:33 ` domob at gcc dot gnu dot org
2005-07-18 19:08 [Bug fortran/22552] New: " schnetter at aei dot mpg dot de
2005-07-19 13:43 ` [Bug fortran/22552] " pinskia at gcc dot gnu dot org

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