[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Tinycc-devel] parsing 0x1e+1 as 0x1e +1
From: |
Sergey Korshunoff |
Subject: |
[Tinycc-devel] parsing 0x1e+1 as 0x1e +1 |
Date: |
Wed, 27 Apr 2016 07:17:47 +0300 |
Hi!
A problem solved (as someone suggested on the list) by teaching tcc to
recognize right exponent chars in next_nomacro1().(no any space chars
after macro expansion). This is like pcc do. A test prgram:
extern int printf(const char *format, ...);
#define ACPI_TYPE_INVALID 0x1E
#define NUM_NS_TYPES ACPI_TYPE_INVALID+1
int array[NUM_NS_TYPES];
#define n 0xe
int main() {
printf("n+1 = %d\n", n+1);
}
prints 15
And preprocessor output is
...
printf("n+1 = %d\n", 0x1e+1);.
https://github.com/seyko2/tinycc/commit/132a3366132a34d55c67f0b73a14e634219bae93
- [Tinycc-devel] parsing 0x1e+1 as 0x1e +1,
Sergey Korshunoff <=
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Vincent Lefevre, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Edmund Grimley Evans, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Sergey Korshunoff, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Edmund Grimley Evans, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Vincent Lefevre, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Sergey Korshunoff, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Vincent Lefevre, 2016/04/27
- Re: [Tinycc-devel] parsing 0x1e+1 as 0x1e +1, Sergey Korshunoff, 2016/04/27