Bug 40319 - write (*,'(A1)') 65 should generate an error/warning
Summary: write (*,'(A1)') 65 should generate an error/warning
Status: RESOLVED WONTFIX
Alias: None
Product: gcc
Classification: Unclassified
Component: libfortran (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: diagnostic
Depends on:
Blocks:
 
Reported: 2009-06-01 12:28 UTC by Thomas Koenig
Modified: 2009-12-18 15:38 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Koenig 2009-06-01 12:28:37 UTC
$ cat foo.f
      write (*,'(A1)') 65
      end
$ gfortran -std=f95 -pedantic -Wall foo.f
$ ./a.out
A
$ 

We might want to permit this with -std=legacy, though.  g77 also accepts it.
Comment 1 Tobias Burnus 2009-06-01 17:41:42 UTC
If we can have a warning/error at compile time it would be great.

However, I'm inclined to allow it for -std=gnu at run time. (I'm personally against too much standard diagnostics at run time. If such an error appears after a lengthy calculation or if the user does not have the source code, such diagnostics are rather unfriendly. While compile-time errors are OK - they can easily worked around using -std=legacy or by changing the source code.)
Comment 2 Paul Thomas 2009-12-18 14:45:30 UTC
Hmmm! What shall we do with this?

IMHO we should issue a WONTFIX.

Paul
Comment 3 Jerry DeLisle 2009-12-18 15:38:20 UTC
I agree, closing