This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/57665] New: cpp: stringification does not work for __GNUC__
- From: "Ulrich.Windl at rz dot uni-regensburg.de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 21 Jun 2013 07:53:34 +0000
- Subject: [Bug c/57665] New: cpp: stringification does not work for __GNUC__
- Auto-submitted: auto-generated
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57665
Bug ID: 57665
Summary: cpp: stringification does not work for __GNUC__
Product: gcc
Version: 4.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: Ulrich.Windl at rz dot uni-regensburg.de
It seems stringification for "__GNUC__" and other related numbers does not
work:
Using "#__GNUC__" produces "# 4" as output, not the expected ``"4"''.
I tried something like
#define GCC_VERSION #__GNUC__ "." #___GNUC_MINOR__ "." #__GNUC_PATCHLEVEL
but all I get is "stray `#' in program"