Bill Allombert on Sat, 8 Mar 2003 01:12:52 +0100

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

Re: #line directives for the pari kernel

On Thu, Feb 27, 2003 at 07:15:41PM +0100, Bill Allombert wrote:
> Here a patch for files cat'ed to mp.c files.
> Something similar could be done for parilvl?.h  files.
> Index: src/kernel/gmp/gcd.c
> ===================================================================
> RCS file: /home/megrez/cvsroot/pari/src/kernel/gmp/gcd.c,v
> retrieving revision 1.3
> diff -u -r1.3 gcd.c
> --- src/kernel/gmp/gcd.c	2003/02/11 18:18:33	1.3
> +++ src/kernel/gmp/gcd.c	2003/02/27 17:41:45
> @@ -1,3 +1,4 @@
> +#line 1 "../src/kernel/gmp/gcd.c"

After getting at the new GNU cpp manual (the old one was not clear), I
found out that

     LINENUM is a non-negative decimal integer constant.  It specifies
     the line number which should be reported for the following line of
     input.  Subsequent lines are counted from LINENUM.

So seemingly the correct value is not 1 but 2:
#line 2 "../src/kernel/gmp/gcd.c"

Since the next line is now the second in the file...

Sorry about that.

#line is very useful with gdb by the way.