This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/53552] New: Add support for !GCC$ warning directive (cf. #pragma warning)
- From: "burnus at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 01 Jun 2012 12:57:40 +0000
- Subject: [Bug fortran/53552] New: Add support for !GCC$ warning directive (cf. #pragma warning)
- Auto-submitted: auto-generated
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].)