This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/18604] assert macro-expands its argument
- From: "joseph at codesourcery dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Mon, 29 Jun 2015 14:49:09 +0000
- Subject: [Bug libc/18604] assert macro-expands its argument
- Auto-submitted: auto-generated
- References: <bug-18604-131 at http dot sourceware dot org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=18604
--- Comment #3 from joseph at codesourcery dot com <joseph at codesourcery dot com> ---
For early history try git://repo.or.cz/glibc/history (a conversion without
the heuristics to combine commits to different files from the same
changeset that were committed with per-file log messages that caused
problems for some of the earlier history). The initial version of
assert.h there from 1991 has (commit
c2547ce6a46f905a7f876f3e2c35e6e9e9b36527):
+/* IGNORE($ */
+#ifdef __STDC__
+/* $) IFANSI($ */
+#define __assert_quotearg(s) #s
+/* $) IGNORE($ */
+#else /* Not ANSI C. */
+/* $) IFTRAD($ */
+#define __assert_quotearg(s) "s"
+/* $) IGNORE($ */
+#endif /* ANSI C. */
+/* $) */
which suggests that pre-ISO C may have been a reason for how this was done
(although pre-ISO C is no longer a concern now and I agree it would make
sense to stop macro-expanding here).
--
You are receiving this mail because:
You are on the CC list for the bug.