This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/82130] stringification (#) in traditional mode
- From: "heiko at hexco dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 07 Oct 2017 20:24:32 +0000
- Subject: [Bug preprocessor/82130] stringification (#) in traditional mode
- Auto-submitted: auto-generated
- References: <bug-82130-4@http.gcc.gnu.org/bugzilla/>
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.