dcsimg
Warnings in VisualC++
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Michael_Lindig
Posted On:   Tuesday, March 26, 2002 10:39 PM

Please remove the warnings from generated code ! Hi I tested the actual antlr-2.7.2a2 release with MS VisualC++ and got a lot of compiler warnings for generated lexer and parser files: TinyCLexer.cpp(244) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data The problem is following assignment on each lexer rule: int _begin=text.length() it shall be changed to size_t _begin=text.length() . In parser file I got following warnings: TinyCParser.cpp(82) : warning C4101: 'pe' : unreferenced local variable The problem is the unused variable pe in the cat   More>>

Please remove the warnings from generated code !


Hi I tested the actual antlr-2.7.2a2 release with MS VisualC++ and got a lot of compiler warnings for generated lexer and
parser files:


			
TinyCLexer.cpp(244) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data


The problem is following assignment on each lexer rule: int _begin=text.length() it shall be changed to size_t
_begin=text.length()
.


In parser file I got following warnings:


			
TinyCParser.cpp(82) : warning C4101: 'pe' : unreferenced local variable


The problem is the unused variable pe in the catch() blocks:


			
catch (ANTLR_USE_NAMESPACE(antlr)RecognitionException& pe ) {
synPredMatched6 = false;
}
   <<Less
About | Sitemap | Contact