Bug 17222 - g77 complains about COMMON variables as unused
g77 complains about COMMON variables as unused
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.1
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2000-09-03 21:10 EDT by Michal Jaegermann
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 09:13:26 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Michal Jaegermann 2000-09-03 21:10:25 EDT
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@harddata.com
Comment 1 Michal Jaegermann 2000-09-03 21:11:40 EDT
Created attachment 3218 [details]
sample Fortran source
Comment 2 Alan Cox 2002-12-15 09:13:26 EST
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.