This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
I don't know if this will work or not, but it's worth a shot.
Uses C++
Joseph Wagner
-----Original Message-----
From: gcc-owner@gcc.gnu.org [mailto:gcc-owner@gcc.gnu.org] On Behalf Of
James Buchanan
Sent: Sunday, December 29, 2002 10:32 AM
To: gcc@gcc.gnu.org
Subject: Generated unique labels
In the Projects file:
===
Generated unique labels. Have some way of generating distinct
labels for use in extended asm statements. I don't know what a
good syntax would be.
===
Has this been done yet? If not has anyone been assigned to it?
Where would this be done? What is an extended asm statement,
is this asm code generated by the back end? Is there any
distinction between asm and extended asm? So things peculiar
to local labels can't be used?
Would this be a function, let's say:
...in file uniquelabel.h
char *
gen_unique_label();
...in file uniquelabel.c
char *
gen_unique_label()
{
/* Get some memory or just return a pointer?? */
char *the_label = (char *)safe_malloc();
/*
Let's say we only use a static char array
and return a pointer to it. The caller gets it
and copies the string straight away, but
this seems silly. Functions should take
care of it.
*/
/*
Or perhaps allocate a string, the caller
can do free(the_label)
*/
/* do stuff */
return (the_label);
}
?
Attachment:
NumberToString.hpp
Description: Text document
Attachment:
SequentialString.cpp
Description: Text document
Attachment:
SequentialString.hpp
Description: Text document
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |