File: bug.c

package info (click to toggle)
clisp 1997-12-06-1
  • links: PTS
  • area: main
  • in suites: hamm, slink
  • size: 20,744 kB
  • ctags: 8,390
  • sloc: ansic: 37,808; lisp: 37,255; asm: 6,393; sh: 3,077; objc: 2,481; makefile: 1,174; sed: 96; perl: 14
file content (8 lines) | stat: -rw-r--r-- 212 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
/* Demonstrate a bug in the preprocessor of Borland C++ 5.0 */

#define a_b 17
#define foo(x) bar(x)
#define do(c) foo(c##_b)
do(a)
/* correct expansion:      bar(17)   */
/* Borland 5.0 expansion:  bar(a_b)  */