[antlr-interest] problems with C target and C++ compiler

Jim Idle jimi at temporal-wave.com
Fri Sep 18 10:49:19 PDT 2009


Check the examples. You should have zero warnings even with -W4

Jim

On Sep 18, 2009, at 10:42 AM, Stefan Oestreicher <so at deluxe-design.at>  
wrote:

> Jim Idle schrieb:
>> Download the examples zip form the download page and copy the driver
>> code from the examples in the C subdirectories. You are just setting
>> up includes incorrectly I think as the compiler thinks your variable
>> is an integer.
>
> Hi,
>
> if I compile a simple C program (http://pastebin.com/m1e0f1257) that
> includes the generated antlr sources (using this grammar:
> http://pastebin.com/m31ea9441 - it's very basic and not yet really
> producing an AST but if I understand correctly this shouldn't matter
> anyway) with
>
> gcc -c -I/usr/local/include -I./include *.c
>
> it compiles but I get tons of warnings as you can see here
> http://pastebin.com/m322821c5 (this was compiled on debian etch with  
> gcc
> 4.1.2).
> If confirmed that the /usr/local/include directory contains the antlr
> header files which were copied
> when I built the libantlr3c-3.1.3 source using ./configure && make &&
> make install wich worked flawlessly.
> I have no idea what the problem is as I believe I have done everything
> neccessary according to the documentation.
>
> Thanks for your help.
>
> Stefan
>
> List: http://www.antlr.org/mailman/listinfo/antlr-interest
> Unsubscribe: http://www.antlr.org/mailman/options/antlr-interest/your-email-address


More information about the antlr-interest mailing list