This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
Re: Preprocessor in #included Files
- From: Steve Kargl <sgk at troutmask dot apl dot washington dot edu>
- To: David Greene <greened at obbligato dot org>
- Cc: fortran at gcc dot gnu dot org
- Date: Mon, 12 Feb 2007 13:45:25 -0800
- Subject: Re: Preprocessor in #included Files
- References: <45D0D608.8090807@obbligato.org>
On Mon, Feb 12, 2007 at 03:03:04PM -0600, David Greene wrote:
>
> Is this a known problem? Is there a workaround?
>
There is insufficient data to provide an answer. If
the offending source code is available, and info about
your system is known, we might be able to help.
Given
%cat test.h
integer a
#if defined(PROBLEM_A)
parameter(a = 1)
#elif defined(PROBLEM_B)
parameter(a = 2)
#else
#error "Select a problem"
#endif
%cat main.F90
program main
#include "test.h"
print *, a
end program main
troutmask:sgk[235] gfc41 --version
GNU Fortran 95 (GCC) 4.1.2 20070127 (prerelease)
troutmask:sgk[236] gfc42 --version
GNU Fortran 95 (GCC) 4.2.0 20070126 (prerelease)
troutmask:sgk[238] gfc4x --version
GNU Fortran 95 (GCC) 4.3.0 20070212 (experimental)
All compile the above.
--
Steve