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/53552] New: Add support for !GCC$ warning directive (cf. #pragma warning)


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: unassigned@gcc.gnu.org
        ReportedBy: burnus@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].)


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