This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug fortran/29471] New: Warn with -std=f95/f2003 when BOZ is used at invalid places


gfortran allows everywhere to use a BOZ.

However, there are constrains in Fortran 95 and 2003 on where to use them.

- Fortran 95: Only in DATA and only integer
- Fortran 2003: Only in DATA or as argument of INT, REAL, DBLE, CMPLX

Expected: An ERROR (or WARNING) is shown, when -std=f95/f2003 is used.

Fortran 95:
"R407 boz-literal-constant [...]
Constraint: A boz-literal-constant may appear only in a DATA statement.[...]
If a data-statement-constant is a boz-literal-constant, the corresponding
object shall be of type integer."

Fortran 2003:
"C410 (R411) A boz-literal-constant shall appear only as a data-stmt-constant
in a DATA statement, as the actual argument associated with the dummy argument
A of the numeric intrinsic functions DBLE, REAL or INT, or as the actual
argument associated with the X or Y dummy argument of the intrinsic function
CMPLX."


-- 
           Summary: Warn with -std=f95/f2003 when BOZ is used at invalid
                    places
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: enhancement
          Priority: P3
         Component: fortran
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: tobias dot burnus at physik dot fu-berlin dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29471


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]