[Bug fortran/41102] openMP include file causes errors when compiling with standards checking

ian dot bush at nag dot co dot uk gcc-bugzilla@gcc.gnu.org
Tue Aug 18 16:46:00 GMT 2009



------- Comment #5 from ian dot bush at nag dot co dot uk  2009-08-18 16:46 -------
Subject: Re:  openMP include file causes errors when compiling
 with standards checking

burnus at gcc dot gnu dot org wrote:
> ------- Comment #4 from burnus at gcc dot gnu dot org  2009-08-18 16:08 -------
> (In reply to comment #3)
>> For C and C++, most diagnostics are disabled by default for code in system 
>> headers.  Shouldn't Fortran do something equivalent?
> 
> Good question. The problem is that with
> 
>   include "somebig_chunk_of_code.f90"
> 
> one can include other code, which does not necessarily contain just PARAMETERs
> (constants) and COMMONs but actual code. For instance octopus (tddft.org) does
> this: It has a MODULE and includes one or two other files in it, which contain
> subroutines/functions belonging to the  MODULE but are for maintenance reasons
> in a separate file. (Fortran 2008's submodules would be a better replacement.)
> 
> 

Also Fortran doesn't have the concept of system headers, so how should the
compiler decide what is a "system header" or not ? In some cases, like openMP
it's reasonably clear, but for third party software it's difficult. Hence my
suggestion in the original bug report to somehow allow the user to specify that
diagnostics from certain include files should be ignored.

Also thanks for fixing this so quickly, the joys of open source !! I've lodged
similar bug reports to Cray ( around 6 months ago ) and IBM ( around
6 years ago !! ) about their mpif.h files with absolutely no joy.

Also I hope I'm replying to the right place, I'm new around here ...

Ian


________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________


-- 


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



More information about the Gcc-bugs mailing list