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 preprocessor/82130] stringification (#) in traditional mode


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82130

Heiko Eißfeldt <heiko at hexco dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |heiko at hexco dot de

--- Comment #1 from Heiko Eißfeldt <heiko at hexco dot de> ---
This variant works for me with:

#define STRINGIFY(x) "x"
#define _ASSERT_(expr)              if (.not. (expr)) print *, STRINGIFY(expr)
program test
logical :: check = .false.
_ASSERT_(check)
end

cpp -traditional-cpp -P -E issues/fortranStringify.f
gives

program test
logical :: check = .false.
if (.not. (check)) print *, "check"
end

This is with cpp 6.3.0 on ubuntu 17.04 amd64.

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