This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain



------- Comment #9 from per at bothner dot com  2005-10-12 07:10 -------
Subject: Re:  [4.1 Regression] line number 0 for <built-in>
 causes GAS to complain

ppluzhnikov at charter dot net wrote:

> May I repeat my question: 
> What is the problem of emitting '#1 <built-in>' anyway?

It's certainly better than emitting '#0 <built-in>', but is
there any reason for emitting either?

> --- gcc/c-opts.c.orig   2005-07-19 05:09:31.000000000 -0700
> +++ gcc/c-opts.c        2005-10-11 22:57:34.000000000 -0700
> @@ -1309,7 +1309,7 @@
> 
>        cb_file_change (parse_in,
>                       linemap_add (&line_table, LC_RENAME, 0,
> -                                  _("<built-in>"), 0));
> +                                  _("<built-in>"), 1));
> 
>        cpp_init_builtins (parse_in, flag_hosted);
>        c_cpp_builtins (parse_in);

See my rationale/discussion for the orginal patch:
http://gcc.gnu.org/ml/gcc-patches/2005-04/msg02132.html
There is eisting code that assumes that builtins have line number 0.
Note this is *internally* - one option is to translate internal
line number 0 to line number 1 on output.  But I think the cleaner
solution is to just supress the '#' lines for <built-in>.

But people think it is important to keep the '#1 <built-in>' lines,
for compatibility, I can convinced.  I just think they're pointless.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]