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

             Bug #: 53552
           Summary: Add support for !GCC$ warning directive (cf. #pragma
                    warning)
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: fortran
        AssignedTo: unassig...@gcc.gnu.org
        ReportedBy: bur...@gcc.gnu.org
        Depends on: 41209


As suggested at http://gcc.gnu.org/ml/fortran/2012-06/msg00003.html - and
related to PR 41209.

In C/C++, one can selectively enable and disable warnings, cf.
http://gcc.gnu.org/onlinedocs/gcc-4.6.0/gcc/Diagnostic-Pragmas.html#Diagnostic-Pragmas

A gfortran solution could be:

  !GCC$ diagnostic warning "-Wconversion"

The support could be also added via #pragma for "-cpp".

Note: The "diagnostic warning" features requires tracking of the directive
location as it does not apply for the whole file. Additionally, the warning
flags can apply to both front-end as well as in the middle-end warnings.

(Remark with regards to #pragma: Those cannot be use in macros; C/C++ uses for
those _Pragma [cf. PR53469].)

Reply via email to