File: cppdollar

package info (click to toggle)
tcng 10b-3
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,644 kB
  • ctags: 2,515
  • sloc: ansic: 19,040; pascal: 4,640; yacc: 2,619; sh: 1,914; perl: 1,546; lex: 772; makefile: 756
file content (25 lines) | stat: -rw-r--r-- 667 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# baseline: gcc -E without -std=c99 or -$ allows $ in identifiers -------------
gcc -E - | grep -v '^#' | grep -v '^$'
#define foo bar
$foo
EOF
$foo
# baseline: gcc -E with -std=c99 or -$ doesn't allow $ in identifiers ---------
gcc `if $DOLLAR; then echo '' '-$'; else echo '' -std=c99; fi` \
  -E - 2>/dev/null | grep -v '^#' | grep -v '^$'
#define foo bar
$foo
EOF
$bar
# tcc invokes cpp with -std=c99 or -$ -----------------------------------------
tcc -c -u stderr -Wnounused 2>&1
#define foo bar
$foo = 1;
EOF
$bar = 1
# tcsim invokes cpp with -std=c99 or -$ ---------------------------------------
tcsim
#define foo bar
$foo = 42 echo $bar
EOF
0.000000 * : 42