fb39ca4 / picoc

Automatically exported from code.google.com/p/picoc
0 stars 0 forks source link

Strange initializer and warnings in lex.c #135

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile lex.c

What is the expected output? What do you see instead?
Compiling lex.c I get two warnings:

lex.c(31): 'ValueType *' differs in levels of indirection from 'int'

31: static struct Value LexValue = { TypeVoid, &LexAnyValue, FALSE, FALSE };

This initializer looks strange considering the type of LexValue (struct Value 
has 6 members, including 3 pointers etc.).

lex.c(203): conversion from 'double' to 'int', possible loss of data

203: Result = Result * (double)Base + GET_BASE_DIGIT(*Lexer->Pos);

Should probably read:

203: Result = Result * Base + GET_BASE_DIGIT(*Lexer->Pos);

What version of the product are you using? On what operating system?
Latest read-only version from SVN (dated October 5th, 2011).
Using Visual Studio C++ 2010 Express (Windows 7).

Please provide any additional information below.

Original issue reported on code.google.com by jjohans...@gmail.com on 5 Oct 2011 at 9:31

GoogleCodeExporter commented 8 years ago
Thanks for the bug report.

Fixed in revision #571

Original comment by zik.sale...@gmail.com on 5 Oct 2011 at 9:51

GoogleCodeExporter commented 8 years ago
Great! Thanks for the speedy response!

J�rgen

Original comment by jjohans...@gmail.com on 6 Oct 2011 at 9:13