public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: what is the gcc frontend #line pragma
       [not found] <200608011059.k71AxMka028635@smtp.google.com>
@ 2006-08-01 14:00 ` Ian Lance Taylor
  0 siblings, 0 replies; 3+ messages in thread
From: Ian Lance Taylor @ 2006-08-01 14:00 UTC (permalink / raw)
  To: miwei; +Cc: gcc-help

"miwei" <miwei@ict.ac.cn> writes:

> I fine there are many  #line xxx “c-parse.y”  statements in c-parse.c file. 
> What is the use of the #line pragma?  When I gdb the yyparse function,
> I find it is not line-by-line consistent with the c-parse.c file. How to
> make 
> the gdb process easier?   Thanks

#line is a standard C preprocessing directive.  From ISO C 99 6.10.4:

    A preprocessing directive of the form
        # line digit-sequence new-line
    causes the implementation to behave as if the following sequence of
    source lines begins with a source line that has a line number as
    specified by the digit sequence (interpreted as a decimal
    integer). The digit sequence shall not specify zero, nor a number
    greater than 2147483647.

    A preprocessing directive of the form
        # line digit-sequence "s-char-sequenceopt" new-line
    sets the presumed line number similarly and changes the presumed name
    of the source file to be the contents of the character string literal.

This will affect the debugging information, which is read by gdb.

Ian

^ permalink raw reply	[flat|nested] 3+ messages in thread

* what is the gcc frontend #line pragma
@ 2006-08-01 10:59 miwei
  0 siblings, 0 replies; 3+ messages in thread
From: miwei @ 2006-08-01 10:59 UTC (permalink / raw)
  To: gcc-help

I fine there are many  #line xxx “c-parse.y”  statements in c-parse.c file. 
What is the use of the #line pragma?  When I gdb the yyparse function,
I find it is not line-by-line consistent with the c-parse.c file. How to
make 
the gdb process easier?   Thanks

----------------------------------------------------------------------------
--------
MiWei
Advanced Compiler Lab
Institute of Computing Technology
Chinese Academy of Science
mail: miwei@ict.ac.cn
----------------------------------------------------------------------------
--------


^ permalink raw reply	[flat|nested] 3+ messages in thread

* what is the gcc frontend #line pragma
@ 2006-08-01 10:59 miwei
  0 siblings, 0 replies; 3+ messages in thread
From: miwei @ 2006-08-01 10:59 UTC (permalink / raw)
  To: gcc-help

I fine there are many  #line xxx “c-parse.y”  statements in c-parse.c file. 
What is the use of the #line pragma?  When I gdb the yyparse function,
I find it is not line-by-line consistent with the c-parse.c file. How to
make 
the gdb process easier?   Thanks

----------------------------------------------------------------------------
--------
MiWei
Advanced Compiler Lab
Institute of Computing Technology
Chinese Academy of Science
mail: miwei@ict.ac.cn
----------------------------------------------------------------------------
--------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-08-01 14:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <200608011059.k71AxMka028635@smtp.google.com>
2006-08-01 14:00 ` what is the gcc frontend #line pragma Ian Lance Taylor
2006-08-01 10:59 miwei
  -- strict thread matches above, loose matches on Subject: below --
2006-08-01 10:59 miwei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).