Bug 17222 - g77 complains about COMMON variables as unused
Summary: g77 complains about COMMON variables as unused
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.1
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-09-04 01:10 UTC by Michal Jaegermann
Modified: 2008-05-01 15:37 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-12-15 14:13:26 UTC
Embargoed:


Attachments (Terms of Use)
sample Fortran source (12.64 KB, application/octet-stream)
2000-09-04 01:11 UTC, Michal Jaegermann
no flags Details

Description Michal Jaegermann 2000-09-04 01:10:25 UTC
When compiling with -Wall g77 marks all variables passed through
COMMON as unused.  This practically nullifies a usefulness of this
warning.  Attached sample program when compiled with g77 from 6.2
distribution (egcs) produces the following:

mdbnch2.f: In subroutine `minit':
mdbnch2.f:315: warning: unused variable `cf'
mdbnch2.f: In subroutine `mstep':
mdbnch2.f:881: warning: unused variable `chart'
mdbnch2.f:881: warning: unused variable `chars'
mdbnch2.f:881: warning: unused variable `chard'
mdbnch2.f: In subroutine `crystl':
mdbnch2.f:1978: warning: unused variable `name'

which is correct.  A new version of compiler generates close to 960
"unused variable" warnings on the same source.

  Michal
  michal

Comment 1 Michal Jaegermann 2000-09-04 01:11:40 UTC
Created attachment 3218 [details]
sample Fortran source

Comment 2 Alan Cox 2002-12-15 14:13:26 UTC
Fixed in newer compilers. Verified ok with 8.0



Note You need to log in before you can comment on or make changes to this bug.