public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Fwd: GCC label numbering
       [not found] <AANLkTimb3Pn9As6huepyTDzwoYvvT4Vgr_RZ8EBYdcB7@mail.gmail.com>
@ 2010-09-07 13:13 ` Joel
  2010-09-07 13:21   ` Andrew Haley
  2010-09-07 13:36   ` Joel
  0 siblings, 2 replies; 3+ messages in thread
From: Joel @ 2010-09-07 13:13 UTC (permalink / raw)
  To: gcc

Hello,
Apparently, at least for MIPS target, GCC generates labels starting
from 2: $L2, $L3, etc.
Do you know why the numbering begins at 2?
Regards,
Joel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Fwd: GCC label numbering
  2010-09-07 13:13 ` Fwd: GCC label numbering Joel
@ 2010-09-07 13:21   ` Andrew Haley
  2010-09-07 13:36   ` Joel
  1 sibling, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2010-09-07 13:21 UTC (permalink / raw)
  To: gcc

On 09/07/2010 02:12 PM, Joel wrote:
> Hello,
> Apparently, at least for MIPS target, GCC generates labels starting
> from 2: $L2, $L3, etc.
> Do you know why the numbering begins at 2?

When I saw this question before, I thought that it'd be easy to find
out by debugging gcc.  However, I also thought that there's no really
good reason why anyone would need the answer, so I didn't look.

You might get more response from others if you said why it's important
for you to know this.

Andrew.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: GCC label numbering
  2010-09-07 13:13 ` Fwd: GCC label numbering Joel
  2010-09-07 13:21   ` Andrew Haley
@ 2010-09-07 13:36   ` Joel
  1 sibling, 0 replies; 3+ messages in thread
From: Joel @ 2010-09-07 13:36 UTC (permalink / raw)
  To: gcc

> When I saw this question before, I thought that it'd be easy to find
> out by debugging gcc.  However, I also thought that there's no really
> good reason why anyone would need the answer, so I didn't look.
>
> You might get more response from others if you said why it's important
> for you to know this.
>
> Andrew.

First, I'm sorry to have posted on both ml, I just figured the gcc ml
may be more relevant to my question.

Second, it's not really _important_, it's more out of curiosity.
Actually, it's for a teaching I'm doing. We make the student compile a
C source code into MIPS assembly language, and make them study it. The
C code contains a while loop and a if condition, and gcc generates
labels for them. As I said, the labelling begins at 2, and I was
wondering why, because students will certainly ask the same question,
and I would like to able to answer them :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-09-07 13:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AANLkTimb3Pn9As6huepyTDzwoYvvT4Vgr_RZ8EBYdcB7@mail.gmail.com>
2010-09-07 13:13 ` Fwd: GCC label numbering Joel
2010-09-07 13:21   ` Andrew Haley
2010-09-07 13:36   ` Joel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).