mirror of
https://github.com/frida/tinycc
synced 2024-12-01 11:56:58 +03:00
5e8fb713c4
Commit 5ce2154c
("-fdollar-in-identifiers addon", 20-04-2015) forgot
to include the test files from Daniel's patch.
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
42 lines
784 B
C
42 lines
784 B
C
#include <stdio.h>
|
|
|
|
#define $(x) x
|
|
#define $fred 10
|
|
#define joe$ 20
|
|
#define hen$y 30
|
|
|
|
#define $10(x) x*10
|
|
#define _$10(x) x/10
|
|
|
|
int main()
|
|
{
|
|
printf("fred=%d\n", $fred);
|
|
printf("joe=%d\n", joe$);
|
|
printf("henry=%d\n", hen$y);
|
|
|
|
printf("fred2=%d\n", $($fred));
|
|
printf("joe2=%d\n", $(joe$));
|
|
printf("henry2=%d\n", $(hen$y));
|
|
|
|
printf("fred10=%d\n", $10($fred));
|
|
printf("joe_10=%d\n", _$10(joe$));
|
|
|
|
int $ = 10;
|
|
int a100$ = 100;
|
|
int a$$ = 1000;
|
|
int a$c$b = 2121;
|
|
int $100 = 10000;
|
|
const char *$$$ = "money";
|
|
|
|
printf("local=%d\n", $);
|
|
printf("a100$=%d\n", a100$);
|
|
printf("a$$=%d\n", a$$);
|
|
printf("a$c$b=%d\n", a$c$b);
|
|
printf("$100=%d\n", $100);
|
|
printf("$$$=%s", $$$);
|
|
|
|
return 0;
|
|
}
|
|
|
|
/* vim: set expandtab ts=4 sw=3 sts=3 tw=80 :*/
|