This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: OT: Is this the right list? - [Fwd: #line and g++]
- From: Mike Stump <mrs at apple dot com>
- To: Aldo Dolfi <dolfi at ccrl dot nj dot nec dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Tue, 17 Sep 2002 15:28:37 -0700
- Subject: Re: OT: Is this the right list? - [Fwd: #line and g++]
On Tuesday, September 17, 2002, at 11:35 AM, Aldo Dolfi wrote:
I posted this message yesterday and got no answer. I know
that I should not expect that every question gets its
answer :) but I would like to know at least if this is
the correct list to ask this kind of question or not.
I tried to search for other places but, apart from general
c++ discussion I found nothing. And I think this is an issue
specific of gcc. I did not find anything in docs, either.
If you think you found a bug, report it to gcc-bugs. Yes, if it
doesn't work, it is probably a bug. I tried it, and it seemed to work:
#line 23 "foo"
void foo() {
}
__Z3foov:
.stabs "foo",132,0,0,Ltext1
Aldo Dolfi wrote:
Hello,
I have a problem in using #line directive with c++ compiler.
If I force a line of code in a `cfile.c' to be considered as
coming from a different source file `source.ext' with a
# line 99 "source.ext"
directive and compile it with g++ it does not work. I mean
that looking at the object file with `objdump -G' I don't
find any reference to the string `source.ext' and if I try
symbolic debugging (ddd) I don't see this file in the list
of sources.
Looking at the assembler output (-E) I saw only .stabn are
inserted and not .stabs "source.ext"
-E doesn't do that, you must be confused.
If I compile the same source file with gcc it works.
Are there any differences in the syntax or usage of #line
between the two compilers?
Also, you failed to mention anything relevant, like a test case, or the
platform, or the debugging information, or the output you saw... This
can lead to people ignoring your message.