http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56850
Bug #: 56850
Summary: Diagnostic of REAL*8 is odd: Accepted with -std=f95,
-pedantic prints warning only with -std=gnu
Classification: Unclassified
Product: gcc
Version: 4.9.0
Status: UNCONFIRMED
Keywords: accepts-invalid, diagnostic
Severity: normal
Priority: P3
Component: fortran
AssignedTo: [email protected]
ReportedBy: [email protected]
Test case:
real*8 r
r = 1
end
Using GCC 4.1 with -std=f95 (but not GCC >=4.3) shows:
real*8
1
Error: Nonstandard type declaration REAL*8 at (1)
Using GCC 4.1 to GCC 4.9, "-pedantic" shows:
real*8 r
1
Warning: GNU Extension: Nonstandard type declaration REAL*8 at (1)
However, with GCC 4.3 to 4.9, -std=f95 -pedantic shows nothing.
I had expected that -std=f95 prints some warning/error diagnostic but it does
not. And, in particular, if "-pedantic -std=gnu" prints a warning, "-pedantic
-std=f95" should do so even more!
Another oddness: "-pedantic" prints a warning, if one uses "-pedantic -Werror"
- what does it print? Answer an error - but not the same but a simple
"Unclassifiable statement".