This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/33950] New: Warning missing for function result not set
- From: "fxcoudert at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 30 Oct 2007 16:27:08 -0000
- Subject: [Bug fortran/33950] New: Warning missing for function result not set
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
In the first case below, a warning should be emitted just the same as the
second case... Types other than character are not affected, because for them
the middle-end will do the job anyway.
$ cat s.f90
function pop() result(item)
character(len=0) :: item
end function pop
$ gfortran s.f90 -c
$ cat t.f90
function pop()
character(len=1) :: pop
end function pop
$ gfortran t.f90 -c
t.f90: In function ?pop?:
t.f90:1: warning: Function does not return a value
--
Summary: Warning missing for function result not set
Product: gcc
Version: 4.3.0
Status: UNCONFIRMED
Keywords: diagnostic
Severity: enhancement
Priority: P3
Component: fortran
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: fxcoudert at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33950