This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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 libc/18604] assert macro-expands its argument


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.


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