* [Bug preprocessor/21250] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
@ 2005-04-27 13:34 ` pinskia at gcc dot gnu dot org
2005-04-27 13:53 ` [Bug preprocessor/21250] [4.1 Regression] " pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-27 13:34 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |bothner at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
2005-04-27 13:34 ` [Bug preprocessor/21250] " pinskia at gcc dot gnu dot org
@ 2005-04-27 13:53 ` pinskia at gcc dot gnu dot org
2005-04-28 5:12 ` bothner at gcc dot gnu dot org
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-04-27 13:53 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Summary|line number 0 for <built-in>|[4.1 Regression] line number
|causes GAS to complain |0 for <built-in> causes GAS
| |to complain
Target Milestone|--- |4.1.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
2005-04-27 13:34 ` [Bug preprocessor/21250] " pinskia at gcc dot gnu dot org
2005-04-27 13:53 ` [Bug preprocessor/21250] [4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-04-28 5:12 ` bothner at gcc dot gnu dot org
2005-04-28 15:08 ` segher at kernel dot crashing dot org
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-04-28 5:12 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bothner at gcc dot gnu dot org 2005-04-28 05:12 -------
Not sure what the right solution is.
We should be consistent as to whether definitions in <built-in>
have line 0 and line 1, and it wasn't before my change.
One option is to fix gas.
Another if to suppress the # 0 <built-in> line, as it doesn't
seem very useful.
Another is to declare this a gas bug.
There are of course others ....
(However, I'm on vacation and away from home, so deeling
with email and bugs i difficult.)
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |bothner at gcc dot gnu dot
|dot org |org
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2005-04-28 05:12:41
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
` (2 preceding siblings ...)
2005-04-28 5:12 ` bothner at gcc dot gnu dot org
@ 2005-04-28 15:08 ` segher at kernel dot crashing dot org
2005-04-28 23:59 ` bothner at gcc dot gnu dot org
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: segher at kernel dot crashing dot org @ 2005-04-28 15:08 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From segher at kernel dot crashing dot org 2005-04-28 15:08 -------
The C standard has this to say about line numbers, in 6.10.4/2:
The line number of the current source line is one greater than the number of new-line characters read
or introduced in translation phase 1 (5.1.1.2) while processing the source file to the current token.
So, a line number of 0 is impossible. GAS is correct to complain about this.
It would be nice to be consistent, yes; but consistently right, please, not
consistently wrong ;-)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
` (3 preceding siblings ...)
2005-04-28 15:08 ` segher at kernel dot crashing dot org
@ 2005-04-28 23:59 ` bothner at gcc dot gnu dot org
2005-05-17 21:55 ` pinskia at gcc dot gnu dot org
2005-09-15 23:31 ` ppluzhnikov at charter dot net
6 siblings, 0 replies; 8+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-04-28 23:59 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bothner at gcc dot gnu dot org 2005-04-28 23:59 -------
Re comment #2:
I don't believe the text you quoted from the C standard is relevant.
<built-in> is not a "source file".
While the C standard isn't directly relevant to Gas, a relevant issue
is what the C standard says of #line directives: Should a C compiler
complain if it sees a line number zero in a #line directive? Note this
is directly answered by your quotation.
But rather than argue standards, my inclination would be to use zero
as the pseudo-line-number of <built-in> declarations, but suppress the
output of the # 0 <built-in> in preprocessor output. This will have to
be discussed on the gcc/gcc-patches mailing list (after I get back home).
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
` (4 preceding siblings ...)
2005-04-28 23:59 ` bothner at gcc dot gnu dot org
@ 2005-05-17 21:55 ` pinskia at gcc dot gnu dot org
2005-09-15 23:31 ` ppluzhnikov at charter dot net
6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-17 21:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-17 21:55 -------
*** Bug 21634 has been marked as a duplicate of this bug. ***
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |falk at debian dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Bug preprocessor/21250] [4.1 Regression] line number 0 for <built-in> causes GAS to complain
2005-04-27 13:30 [Bug preprocessor/21250] New: line number 0 for <built-in> causes GAS to complain segher at kernel dot crashing dot org
` (5 preceding siblings ...)
2005-05-17 21:55 ` pinskia at gcc dot gnu dot org
@ 2005-09-15 23:31 ` ppluzhnikov at charter dot net
6 siblings, 0 replies; 8+ messages in thread
From: ppluzhnikov at charter dot net @ 2005-09-15 23:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ppluzhnikov at charter dot net 2005-09-15 23:31 -------
The line '#0 <built-in>' causes trouble for other tools that work with
the output from 'gcc -E'; e.g. edgcpfe refuses to parse it:
$ gcc -E - < /dev/null > junk.i && edgcpfe --c junk.i
"<stdin>", line 1: error: invalid line number
# 0 "<built-in>"
^
1 error detected in the compilation of "junk.i".
What is the problem of emitting '#1 <built-in>' anyway?
Since neither corresponds to a "real" line number, it's not clear what
advantage '#0' has, especially if it is to be suppressed in the output.
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ppluzhnikov at charter dot
| |net
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21250
^ permalink raw reply [flat|nested] 8+ messages in thread