This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
- From: "per at bothner dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2005 07:10:32 -0000
- Subject: [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
- References: <bug-21250-1673@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- 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