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: "ppluzhnikov at charter dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Oct 2005 06:16:57 -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 #8 from ppluzhnikov at charter dot net 2005-10-12 06:16 -------
The patch above suppresses the '#0 <built-in>', but not if one does:
/usr/local/gcc-4.1-20050813/bin/gcc -v -E -dD - < /dev/null
in which case it *still* produces (now arguably plain wrong):
# 1 "<stdin>"
#define __STDC_HOSTED__ 1
# 0 "<built-in>"
#define __GNUC__ 4
# 0 "<built-in>"
#define __GNUC_MINOR__ 1
...
The patch below makes it emit this instead:
# 1 "<stdin>"
# 1 "<built-in>"
#define __STDC_HOSTED__ 1
# 1 "<built-in>"
#define __GNUC__ 4
# 1 "<built-in>"
#define __GNUC_MINOR__ 1
# 1 "<built-in>"
#define __GNUC_PATCHLEVEL__ 0
# 1 "<built-in>"
which roughly matches what gcc-3.x and 2.9x did.
May I repeat my question:
What is the problem of emitting '#1 <built-in>' anyway?
--- 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);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250