M
Mihai Vasilian
Hello,
I am trying to write a small lexer for source code. (something simple)
I've been looking at the syntax of the "[floating-literal]:" in C++ ISO.
I had this idea of testing with very long repetition of 1 in "[fractional-constant]"
I compiled with VS2010 and the error is:
"fatal error C1064: compiler limit : token overflowed internal buffer"
C1064 is described as: "An identifier exceeds the length of the internal buffer used for identifiers. Shorten the name."
---code---
#include <iostream>
int main()
{
float f = 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.e1;
std::cout << f << std::endl;
return 0;
};
---end_of_code---
So,
1) is the length of the [digit-sequence] specified anywhere ? ISO/IEEE
2) why GCC takes it without warning ?
3) is this C1064 error coming possibly from the lexer of MS compiler front-end ? Do you think char id[130] (for an identifier) is large enough ?
Thanks.
Mihai.
I am trying to write a small lexer for source code. (something simple)
I've been looking at the syntax of the "[floating-literal]:" in C++ ISO.
I had this idea of testing with very long repetition of 1 in "[fractional-constant]"
I compiled with VS2010 and the error is:
"fatal error C1064: compiler limit : token overflowed internal buffer"
C1064 is described as: "An identifier exceeds the length of the internal buffer used for identifiers. Shorten the name."
---code---
#include <iostream>
int main()
{
float f = 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111.e1;
std::cout << f << std::endl;
return 0;
};
---end_of_code---
So,
1) is the length of the [digit-sequence] specified anywhere ? ISO/IEEE
2) why GCC takes it without warning ?
3) is this C1064 error coming possibly from the lexer of MS compiler front-end ? Do you think char id[130] (for an identifier) is large enough ?
Thanks.
Mihai.