* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
@ 2006-08-09 18:03 ` pinskia at gcc dot gnu dot org
2006-08-09 18:10 ` tobias dot burnus at physik dot fu-berlin dot de
` (6 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-09 18:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-08-09 18:03 -------
One problem without using -tranditional-cpp is that some tokens in C are not
tokens in Fortran so you could get the wrong result. This is why
-tranditional-cpp is used.
There is no standard for Preprocessed Fortran Source at all.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|normal |enhancement
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
2006-08-09 18:03 ` [Bug fortran/28662] " pinskia at gcc dot gnu dot org
@ 2006-08-09 18:10 ` tobias dot burnus at physik dot fu-berlin dot de
2006-10-31 13:03 ` burnus at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: tobias dot burnus at physik dot fu-berlin dot de @ 2006-08-09 18:10 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from tobias dot burnus at physik dot fu-berlin dot de 2006-08-09 18:10 -------
> One problem without using -tranditional-cpp is that some tokens in C are not
> tokens in Fortran so you could get the wrong result. This is why
> -tranditional-cpp is used.
I though the -lang-fortran, which is passed (according to gfortran -###), takes
care of this?
> There is no standard for Preprocessed Fortran Source at all.
Well, that I assumed. But it is still (somehow) based on ISO C's preprocessor.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
2006-08-09 18:03 ` [Bug fortran/28662] " pinskia at gcc dot gnu dot org
2006-08-09 18:10 ` tobias dot burnus at physik dot fu-berlin dot de
@ 2006-10-31 13:03 ` burnus at gcc dot gnu dot org
2008-02-08 17:55 ` burnus at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2006-10-31 13:03 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from burnus at gcc dot gnu dot org 2006-10-31 13:03 -------
Confirm my bug. See also 29671 ("#" must be in the first column).
--
burnus at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-10-31 13:03:00
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
` (2 preceding siblings ...)
2006-10-31 13:03 ` burnus at gcc dot gnu dot org
@ 2008-02-08 17:55 ` burnus at gcc dot gnu dot org
2008-04-23 19:30 ` burnus at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-02-08 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from burnus at gcc dot gnu dot org 2008-02-08 17:54 -------
One big problem which prevents omitting the -traditional-cpp is that comments
are not ignored. Another example of this is
! .... /*
which is regarded as the beginning of a C/C++ comment. Thus we should add two
modes to CPP, one for fixed-form and one for free-form Fortran code.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
` (3 preceding siblings ...)
2008-02-08 17:55 ` burnus at gcc dot gnu dot org
@ 2008-04-23 19:30 ` burnus at gcc dot gnu dot org
2008-07-30 18:08 ` burnus at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-04-23 19:30 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from burnus at gcc dot gnu dot org 2008-04-23 19:29 -------
Additional point, one needs to take care also of continuation lines of the
following kind. This should print "Hello Paul" and not "Hello Hans".
#define Paul Hans
! Paul's string
print *,'Hello &
&Paul'
end
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
` (4 preceding siblings ...)
2008-04-23 19:30 ` burnus at gcc dot gnu dot org
@ 2008-07-30 18:08 ` burnus at gcc dot gnu dot org
2008-08-06 6:25 ` burnus at gcc dot gnu dot org
2008-08-06 6:27 ` burnus at gcc dot gnu dot org
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-07-30 18:08 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from burnus at gcc dot gnu dot org 2008-07-30 18:06 -------
For an initial, incomplete patch see:
http://gcc.gnu.org/ml/fortran/2008-07/msg00248.html
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
` (5 preceding siblings ...)
2008-07-30 18:08 ` burnus at gcc dot gnu dot org
@ 2008-08-06 6:25 ` burnus at gcc dot gnu dot org
2008-08-06 6:27 ` burnus at gcc dot gnu dot org
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-06 6:25 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from burnus at gcc dot gnu dot org 2008-08-06 06:24 -------
> For an initial, incomplete patch see:
> http://gcc.gnu.org/ml/fortran/2008-07/msg00248.html
Slighly updated version. Set tradtional to 0 in fortran/cpp.c to enable new
features, which will fail if the following (work items) are in you Fortran
file:
- Spacing needs to be preserved for fixed-form Fortran
(currently fails in the test suite)
- Check that '...''...' work (seems so)
- Problem mentioned in comment 5
* Max linelength option for gfortran and cpp
* Fortran/Fixed-form-source Fortran for cpp
* Should one use c_lang instead of a flag? Advantage for c_lang: Fortran is a
language; advantage for flag: the CPP features can be tuned by c_lang.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug fortran/28662] fpp call of gfortran: -traditional-cpp versus newer macros like #x
2006-08-09 14:04 [Bug fortran/28662] New: " tobias dot burnus at physik dot fu-berlin dot de
` (6 preceding siblings ...)
2008-08-06 6:25 ` burnus at gcc dot gnu dot org
@ 2008-08-06 6:27 ` burnus at gcc dot gnu dot org
7 siblings, 0 replies; 12+ messages in thread
From: burnus at gcc dot gnu dot org @ 2008-08-06 6:27 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from burnus at gcc dot gnu dot org 2008-08-06 06:25 -------
Created an attachment (id=16029)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16029&action=view)
libcpp patch (w/o setting traditional = 0 )
Said patch, see comment 7 for TODO items.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28662
^ permalink raw reply [flat|nested] 12+ messages in thread