[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Parsing bug

From: Philippe Ribet
Subject: Re: [Tinycc-devel] Parsing bug
Date: Mon, 14 May 2007 08:20:01 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5

Rob Landley wrote:

On Sunday 13 May 2007 4:37 am, Philippe Ribet wrote:
tcc failed to parse such code because of the "\" character.

#ifdef WIN32
#  include <windows.h>
#  include <gl\glaux.h>
#  include <X11/Xlib.h>
#  include <GL/glx.h>

This was another one of the grischka fixes, but I haven't been tracking Windows stuff because I have neither a windows machine, nor much interest
the platform.

My point was to compile on Linux systems code written for portability.

1) The #include <gl\glaux.h> doesn't get parsed on Linux systems because the #ifdef prevents everything until the #else from being looked at. So if your concern is "to compile on Linux systems", then the answer is "it does".

2) I just tried it and it complained about putting a space between the # and the include, which I agree is a stupid thing to do but which C apparently allows.

But that's a different bug.

Hello Rob,

I'm quite surprised! I just updated my hg repository to be sure. I've only one more patch to fix visibility problem (else, linker is not operational on my system).
I still have the error message due to "\" character:
bug.c:5: stray '\' in program

I have no complaint about the spaces between # and "include".

I just don't understand how we could get different results. My system is Debian 4.0 (etch), but this should not have any influence on parsing stage...

Could someone give it a try?

Here is the program I used:
#include <stdio.h>

#ifdef WIN32
#  include <windows.h>
#  include <gl\glaux.h>
#  include <X11/Xlib.h>
#  include <GL/glx.h>

int main(int argc, char ** argv) {
 return 0;

Best regards,

Philippe Ribet

                        The README file said
             "Requires Windows 95, NT 4.0, or better."
                   So... I installed it on Linux!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]