#line macros in parse.c

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

#line macros in parse.c

Brown, Dave

Are the #line macros really needed? Because on Windows if you try to compile
SQLite with Assembly, Machine Code, Source Code output files generated at
the same time ( Properties->C/C++ -> Output Files: Assembler Output =
Assembly, Machine Code and Source )  which is the /FAcs flag, the
compilation breaks because it tries to find the file "parse.y" which doesn't
exist.

Ultimately this is probably a MSFT compiler bug, but right now it's breaking
the compile if you have this flag turned on, and I'm wondering if these
#line macros are really needed or are they just leftover from debugging?

Thanks,

Dave
Reply | Threaded
Open this post in threaded view
|

Re: #line macros in parse.c

Thomas Fjellstrom
On June 9, 2005 03:49 pm, Brown, Dave wrote:

> Are the #line macros really needed? Because on Windows if you try to
> compile SQLite with Assembly, Machine Code, Source Code output files
> generated at the same time ( Properties->C/C++ -> Output Files: Assembler
> Output = Assembly, Machine Code and Source )  which is the /FAcs flag, the
> compilation breaks because it tries to find the file "parse.y" which
> doesn't exist.
>
> Ultimately this is probably a MSFT compiler bug, but right now it's
> breaking the compile if you have this flag turned on, and I'm wondering if
> these #line macros are really needed or are they just leftover from
> debugging?

Sounds like they were generated from parse.y. Yacc/Bison insert line counts so
you have an idea where in the original file an error is located.

> Thanks,
>
> Dave

--
Thomas Fjellstrom
[hidden email]
Reply | Threaded
Open this post in threaded view
|

RE: #line macros in parse.c

Brown, Dave
In reply to this post by Brown, Dave
I dont know how they were generated, but they are in the source zipfile you
download from the sqlite.org site.

-Dave

-----Original Message-----
From: Thomas Fjellstrom [mailto:[hidden email]]
Sent: Thursday, June 09, 2005 3:16 PM
To: [hidden email]
Subject: Re: [sqlite] #line macros in parse.c

On June 9, 2005 03:49 pm, Brown, Dave wrote:

> Are the #line macros really needed? Because on Windows if you try to
> compile SQLite with Assembly, Machine Code, Source Code output files
> generated at the same time ( Properties->C/C++ -> Output Files:
> Assembler Output = Assembly, Machine Code and Source )  which is the
> /FAcs flag, the compilation breaks because it tries to find the file
> "parse.y" which doesn't exist.
>
> Ultimately this is probably a MSFT compiler bug, but right now it's
> breaking the compile if you have this flag turned on, and I'm
> wondering if these #line macros are really needed or are they just
> leftover from debugging?

Sounds like they were generated from parse.y. Yacc/Bison insert line counts
so you have an idea where in the original file an error is located.

> Thanks,
>
> Dave

--
Thomas Fjellstrom
[hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: #line macros in parse.c

D. Richard Hipp
In reply to this post by Brown, Dave
On Thu, 2005-06-09 at 14:49 -0700, Brown, Dave wrote:
> Are the #line macros really needed? Because on Windows if you try to compile
> SQLite with Assembly, Machine Code, Source Code output files generated at
> the same time ( Properties->C/C++ -> Output Files: Assembler Output =
> Assembly, Machine Code and Source )  which is the /FAcs flag, the
> compilation breaks because it tries to find the file "parse.y" which doesn't
> exist.
>

parse.c is a generated file. The #line directives are needed to trace
error message back to the original source file, parse.y.

If your (broken) compiler insists on having parse.y present, then why
not just download it from the website.

  http://www.sqlite.org/cvstrac/getfile/sqlite/src/parse.y


--
D. Richard Hipp <[hidden email]>