* (printf) ("hello world\n");
@ 2003-12-09 20:41 Michael Elizabeth Chastain
2003-12-09 21:01 ` Dale Johannesen
2003-12-09 23:56 ` Geoff Keating
0 siblings, 2 replies; 22+ messages in thread
From: Michael Elizabeth Chastain @ 2003-12-09 20:41 UTC (permalink / raw)
To: gcc
I have a language lawyer question.
int main ()
{
(printf) ("hello world\n");
return 0;
}
Is this a conforming C program?
There is no "#include <stdio.h>" so there is no declaration
in scope for printf.
gcc 2.95.3 and gcc 3.3.2 both say:
hello.c: In function `main':
hello.c:3: `printf' undeclared (first use in this function)
hello.c:3: (Each undeclared identifier is reported only once
hello.c:3: for each function it appears in.)
This happens with each of:
-std=iso9899:1990
-std=iso9899:199409
-std=iso9899:1999
But the HP ansi-c and aCC compilers accept it just fine.
This kind of code comes out of a macro expansion with readline 4.3
and gcc 3.3.2 on native hppa2.0w-hp-hpux11.11. It's the end
result of an interaction between multibyte support in hpux11
and a strange-looking workaround in readline.
Of course the question "is this conforming ..." depends on a particular
standard. So I think I am asking three questions, one for each of the
three standards.
If the program is not conforming, then I can work on a patch for
readline. But if the program is conforming, then I can file a PR
against gcc (and I'll still have to patch readline).
(Personally I would be happier if this program is not conforming.)
Michael C
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-09 20:41 (printf) ("hello world\n"); Michael Elizabeth Chastain
@ 2003-12-09 21:01 ` Dale Johannesen
2003-12-09 23:56 ` Geoff Keating
1 sibling, 0 replies; 22+ messages in thread
From: Dale Johannesen @ 2003-12-09 21:01 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gcc, Dale Johannesen
On Dec 9, 2003, at 12:40 PM, Michael Elizabeth Chastain wrote:
> I have a language lawyer question.
>
> int main ()
> {
> (printf) ("hello world\n");
> return 0;
> }
>
> Is this a conforming C program?
c89 3.3.2.2:
"If the expression that precedes the parenthesized argument list in a
function call
consists solely of an identifier, and if no declaration is visible for
this identifier,
the identifier is implicitly declared exactly as if , in the innermost
block containing
the function call, the declaration "extern int <identifier>();"
appeared."
So the implicit declaration is not supposed to happen when the function
identifier
is surrounded by parentheses, and this is not conforming.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-09 20:41 (printf) ("hello world\n"); Michael Elizabeth Chastain
2003-12-09 21:01 ` Dale Johannesen
@ 2003-12-09 23:56 ` Geoff Keating
2003-12-10 9:53 ` Eyal Lebedinsky
1 sibling, 1 reply; 22+ messages in thread
From: Geoff Keating @ 2003-12-09 23:56 UTC (permalink / raw)
To: Michael Elizabeth Chastain; +Cc: gcc
mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:
> I have a language lawyer question.
>
> int main ()
> {
> (printf) ("hello world\n");
> return 0;
> }
>
> Is this a conforming C program?
>
> There is no "#include <stdio.h>" so there is no declaration
> in scope for printf.
This would be nonconforming even if it was
int main()
{
printf ("hello world\n");
}
since printf is a varargs function and so must be prototyped before it
is called (ISO C 6.5.2.2 paragraph 6).
(I think Dale answered the question you really wanted to ask.)
--
- Geoffrey Keating <geoffk@geoffk.org>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-09 23:56 ` Geoff Keating
@ 2003-12-10 9:53 ` Eyal Lebedinsky
2003-12-10 10:18 ` Andreas Schwab
0 siblings, 1 reply; 22+ messages in thread
From: Eyal Lebedinsky @ 2003-12-10 9:53 UTC (permalink / raw)
To: gcc; +Cc: Michael Elizabeth Chastain
Geoff Keating wrote:
>
> mec.gnu@mindspring.com (Michael Elizabeth Chastain) writes:
>
> > I have a language lawyer question.
> >
> > int main ()
> > {
> > (printf) ("hello world\n");
> > return 0;
> > }
> >
> > Is this a conforming C program?
> >
> > There is no "#include <stdio.h>" so there is no declaration
> > in scope for printf.
>
> This would be nonconforming even if it was
>
> int main()
> {
> printf ("hello world\n");
> }
>
> since printf is a varargs function and so must be prototyped before it
> is called (ISO C 6.5.2.2 paragraph 6).
But without <stdio.h> the varargs attribute is not present and all is
well. Naturally, it may very well fail to execute correctly, but this
is not the issue here.
--
Eyal Lebedinsky (eyal@eyal.emu.id.au) <http://samba.org/eyal/>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 9:53 ` Eyal Lebedinsky
@ 2003-12-10 10:18 ` Andreas Schwab
2003-12-10 12:45 ` Robert Dewar
0 siblings, 1 reply; 22+ messages in thread
From: Andreas Schwab @ 2003-12-10 10:18 UTC (permalink / raw)
To: Eyal Lebedinsky; +Cc: gcc, Michael Elizabeth Chastain
Eyal Lebedinsky <eyal@eyal.emu.id.au> writes:
> But without <stdio.h> the varargs attribute is not present
A varargs function is always a varargs function, whether it is prototyped
or not. But without a proper prototype the behaviour is undefined.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 10:18 ` Andreas Schwab
@ 2003-12-10 12:45 ` Robert Dewar
2003-12-10 13:12 ` Segher Boessenkool
0 siblings, 1 reply; 22+ messages in thread
From: Robert Dewar @ 2003-12-10 12:45 UTC (permalink / raw)
To: Andreas Schwab; +Cc: Eyal Lebedinsky, gcc, Michael Elizabeth Chastain
Andreas Schwab wrote:
> Eyal Lebedinsky <eyal@eyal.emu.id.au> writes:
>
>
>>But without <stdio.h> the varargs attribute is not present
>
>
> A varargs function is always a varargs function, whether it is prototyped
> or not. But without a proper prototype the behaviour is undefined.
Is it really true that the name printf is reserved? Is a C program not
allowed to define its own printf function (which might or might not be
varargs)? What's the story here?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 12:45 ` Robert Dewar
@ 2003-12-10 13:12 ` Segher Boessenkool
2003-12-10 13:34 ` Robert Dewar
` (2 more replies)
0 siblings, 3 replies; 22+ messages in thread
From: Segher Boessenkool @ 2003-12-10 13:12 UTC (permalink / raw)
To: Robert Dewar
Cc: gcc, Eyal Lebedinsky, Andreas Schwab, Michael Elizabeth Chastain
On 10-dec-03, at 13:27, Robert Dewar wrote:
> Is it really true that the name printf is reserved? Is a C program not
> allowed to define its own printf function (which might or might not be
> varargs)? What's the story here?
It is reserved only in translation units that have stdio.h #include'd.
Segher
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 13:12 ` Segher Boessenkool
@ 2003-12-10 13:34 ` Robert Dewar
2003-12-10 13:36 ` Gabriel Dos Reis
2003-12-10 14:08 ` Joseph S. Myers
2 siblings, 0 replies; 22+ messages in thread
From: Robert Dewar @ 2003-12-10 13:34 UTC (permalink / raw)
To: Segher Boessenkool
Cc: gcc, Eyal Lebedinsky, Andreas Schwab, Michael Elizabeth Chastain
Segher Boessenkool wrote:
> On 10-dec-03, at 13:27, Robert Dewar wrote:
>
>> Is it really true that the name printf is reserved? Is a C program not
>> allowed to define its own printf function (which might or might not be
>> varargs)? What's the story here?
>
>
> It is reserved only in translation units that have stdio.h #include'd.
Well that's not a matter of being reserved, just normal visibility
rules ...
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 13:12 ` Segher Boessenkool
2003-12-10 13:34 ` Robert Dewar
@ 2003-12-10 13:36 ` Gabriel Dos Reis
2003-12-10 14:08 ` Joseph S. Myers
2 siblings, 0 replies; 22+ messages in thread
From: Gabriel Dos Reis @ 2003-12-10 13:36 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Robert Dewar, gcc, Eyal Lebedinsky, Andreas Schwab,
Michael Elizabeth Chastain
Segher Boessenkool <segher@kernel.crashing.org> writes:
| On 10-dec-03, at 13:27, Robert Dewar wrote:
| > Is it really true that the name printf is reserved? Is a C program not
| > allowed to define its own printf function (which might or might not be
| > varargs)? What's the story here?
Put Andreas' statement in context and use
7.1.3 Reserved identifiers
[...]
-- All identifiers with external linkage in any of the
following subclauses (including the future library
directions) are always reserved for use as identifiers
with external linkage.154)
[...]
[#2] No other identifiers are reserved. If the program
declares or defines an identifier in a context in which it
is reserved (other than as allowed by 7.1.4), or defines a
reserved identifier as a macro name, the behavior is
undefined.
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 13:12 ` Segher Boessenkool
2003-12-10 13:34 ` Robert Dewar
2003-12-10 13:36 ` Gabriel Dos Reis
@ 2003-12-10 14:08 ` Joseph S. Myers
2003-12-10 14:17 ` Segher Boessenkool
2003-12-10 14:19 ` Register Spilling Umar Janjua
2 siblings, 2 replies; 22+ messages in thread
From: Joseph S. Myers @ 2003-12-10 14:08 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Robert Dewar, gcc, Eyal Lebedinsky, Andreas Schwab,
Michael Elizabeth Chastain
On Wed, 10 Dec 2003, Segher Boessenkool wrote:
> On 10-dec-03, at 13:27, Robert Dewar wrote:
> > Is it really true that the name printf is reserved? Is a C program not
> > allowed to define its own printf function (which might or might not be
> > varargs)? What's the story here?
>
> It is reserved only in translation units that have stdio.h #include'd.
It is reserved (in a hosted environment) as an identifier with external
linkage regardless of what headers are included (7.1.3#1). If <stdio.h>
is included then it is alse reserved as a macro name (which however you
may #undef) and as an identifier with file scope.
(C94 reserved certain identifiers with external linkage iff the
corresponding header was included in _any translation unit in the
program_. This was not carried forward into C99; the functions added in
C94 are now unconditionally reserved as identifiers with external linkage
regardless of the headers included.)
--
Joseph S. Myers
jsm@polyomino.org.uk
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 14:08 ` Joseph S. Myers
@ 2003-12-10 14:17 ` Segher Boessenkool
2003-12-10 15:55 ` Andreas Schwab
2003-12-11 17:09 ` Geoff Keating
2003-12-10 14:19 ` Register Spilling Umar Janjua
1 sibling, 2 replies; 22+ messages in thread
From: Segher Boessenkool @ 2003-12-10 14:17 UTC (permalink / raw)
To: Joseph S. Myers
Cc: Michael Elizabeth Chastain, Robert Dewar, gcc, Eyal Lebedinsky,
Andreas Schwab
On 10-dec-03, at 14:36, Joseph S. Myers wrote:
> On Wed, 10 Dec 2003, Segher Boessenkool wrote:
>> On 10-dec-03, at 13:27, Robert Dewar wrote:
>>> Is it really true that the name printf is reserved? Is a C program
>>> not
>>> allowed to define its own printf function (which might or might not
>>> be
>>> varargs)? What's the story here?
>>
>> It is reserved only in translation units that have stdio.h #include'd.
>
> It is reserved (in a hosted environment) as an identifier with external
> linkage regardless of what headers are included (7.1.3#1).
That does not prevent you from declaring and defining your own
printf() function (with a different prototype) though; it only requires
that you make that function have external linkage.
Segher
^ permalink raw reply [flat|nested] 22+ messages in thread
* Register Spilling
2003-12-10 14:08 ` Joseph S. Myers
2003-12-10 14:17 ` Segher Boessenkool
@ 2003-12-10 14:19 ` Umar Janjua
2003-12-11 7:59 ` Jim Wilson
1 sibling, 1 reply; 22+ messages in thread
From: Umar Janjua @ 2003-12-10 14:19 UTC (permalink / raw)
To: gcc
Are the register spilled values laid out in memory following
some particular scheme or randomly?
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 14:17 ` Segher Boessenkool
@ 2003-12-10 15:55 ` Andreas Schwab
2003-12-11 17:09 ` Geoff Keating
1 sibling, 0 replies; 22+ messages in thread
From: Andreas Schwab @ 2003-12-10 15:55 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Joseph S. Myers, Michael Elizabeth Chastain, Robert Dewar, gcc,
Eyal Lebedinsky
Segher Boessenkool <segher@kernel.crashing.org> writes:
> On 10-dec-03, at 14:36, Joseph S. Myers wrote:
>> On Wed, 10 Dec 2003, Segher Boessenkool wrote:
>>> On 10-dec-03, at 13:27, Robert Dewar wrote:
>>>> Is it really true that the name printf is reserved? Is a C program not
>>>> allowed to define its own printf function (which might or might not be
>>>> varargs)? What's the story here?
>>>
>>> It is reserved only in translation units that have stdio.h #include'd.
>>
>> It is reserved (in a hosted environment) as an identifier with external
>> linkage regardless of what headers are included (7.1.3#1).
>
> That does not prevent you from declaring and defining your own
> printf() function (with a different prototype) though; it only requires
> that you make that function have external linkage.
Which requires that you declare it in the first place, otherwise it will
have implicitly external linkage.
Andreas.
--
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, MaxfeldstraÃe 5, 90409 Nürnberg, Germany
Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Register Spilling
2003-12-10 14:19 ` Register Spilling Umar Janjua
@ 2003-12-11 7:59 ` Jim Wilson
2003-12-11 9:01 ` Sanjiv Gupta
0 siblings, 1 reply; 22+ messages in thread
From: Jim Wilson @ 2003-12-11 7:59 UTC (permalink / raw)
To: Umar Janjua; +Cc: gcc
Umar Janjua wrote:
> Are the register spilled values laid out in memory following
> some particular scheme or randomly?
They are first come first served. The first one spilled gets the first
available stack slot, etc.
There have been some proposals to sort them, offhand I don't know if
there are patches available anywhere for this.
--
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
^ permalink raw reply [flat|nested] 22+ messages in thread
* RE: Register Spilling
2003-12-11 7:59 ` Jim Wilson
@ 2003-12-11 9:01 ` Sanjiv Gupta
0 siblings, 0 replies; 22+ messages in thread
From: Sanjiv Gupta @ 2003-12-11 9:01 UTC (permalink / raw)
To: Umar Janjua; +Cc: gcc
> There have been some proposals to sort them, offhand I don't know if
> there are patches available anywhere for this.
> --
> Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
>
>
One of them is
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg00019.html
--Sanjiv
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-10 14:17 ` Segher Boessenkool
2003-12-10 15:55 ` Andreas Schwab
@ 2003-12-11 17:09 ` Geoff Keating
2003-12-11 17:39 ` Segher Boessenkool
2003-12-12 13:07 ` Jan-Benedict Glaw
1 sibling, 2 replies; 22+ messages in thread
From: Geoff Keating @ 2003-12-11 17:09 UTC (permalink / raw)
To: Segher Boessenkool
Cc: Michael Elizabeth Chastain, Robert Dewar, gcc, Eyal Lebedinsky,
Andreas Schwab
Segher Boessenkool <segher@kernel.crashing.org> writes:
> On 10-dec-03, at 14:36, Joseph S. Myers wrote:
> > On Wed, 10 Dec 2003, Segher Boessenkool wrote:
> >> On 10-dec-03, at 13:27, Robert Dewar wrote:
> >>> Is it really true that the name printf is reserved? Is a C program
> >>> not
> >>> allowed to define its own printf function (which might or might
> >>> not be
> >>> varargs)? What's the story here?
> >>
> >> It is reserved only in translation units that have stdio.h #include'd.
> >
> > It is reserved (in a hosted environment) as an identifier with external
> > linkage regardless of what headers are included (7.1.3#1).
>
> That does not prevent you from declaring and defining your own
> printf() function (with a different prototype) though; it only requires
> that you make that function have external linkage.
You mean 'internal linkage'. You can define your own function named
printf only if you (a) do not include stdio.h and (b) declare it
'static'.
--
- Geoffrey Keating <geoffk@geoffk.org>
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-11 17:09 ` Geoff Keating
@ 2003-12-11 17:39 ` Segher Boessenkool
2003-12-12 13:07 ` Jan-Benedict Glaw
1 sibling, 0 replies; 22+ messages in thread
From: Segher Boessenkool @ 2003-12-11 17:39 UTC (permalink / raw)
To: Geoff Keating
Cc: Michael Elizabeth Chastain, Robert Dewar, gcc, Eyal Lebedinsky,
Andreas Schwab
>>>> It is reserved only in translation units that have stdio.h
>>>> #include'd.
>>>
>>> It is reserved (in a hosted environment) as an identifier with
>>> external
>>> linkage regardless of what headers are included (7.1.3#1).
>>
>> That does not prevent you from declaring and defining your own
>> printf() function (with a different prototype) though; it only
>> requires
>> that you make that function have external linkage.
>
> You mean 'internal linkage'. You can define your own function named
> printf only if you (a) do not include stdio.h and (b) declare it
> 'static'.
That makes more sense, yes. I think I misinterpreted what "reserved as
an identifier with external linkage" means. Whoops.
Segher
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-11 17:09 ` Geoff Keating
2003-12-11 17:39 ` Segher Boessenkool
@ 2003-12-12 13:07 ` Jan-Benedict Glaw
2003-12-12 17:17 ` Gabriel Dos Reis
1 sibling, 1 reply; 22+ messages in thread
From: Jan-Benedict Glaw @ 2003-12-12 13:07 UTC (permalink / raw)
To: gcc
[-- Attachment #1: Type: text/plain, Size: 1247 bytes --]
On Thu, 2003-12-11 09:01:51 -0800, Geoff Keating <geoffk@geoffk.org>
wrote in message <jmllpjxp8g.fsf@desire.geoffk.org>:
> Segher Boessenkool <segher@kernel.crashing.org> writes:
> > That does not prevent you from declaring and defining your own
> > printf() function (with a different prototype) though; it only requires
> > that you make that function have external linkage.
>
> You mean 'internal linkage'. You can define your own function named
> printf only if you (a) do not include stdio.h and (b) declare it
> 'static'.
Um, I think:
- You may include <stdio.h> as long as your new printf() has
compatible arguments. It's a Bad Thing, though, because
declaration in <stdio.h> doesn't really belong to your new
function.
- You may also have your own function non-static. Then, it
depends on link-order which function (yours or libc's) is
used. Of course, that's horrible, too:)
MfG, JBG
--
Jan-Benedict Glaw jbglaw@lug-owl.de . +49-172-7608481
"Eine Freie Meinung in einem Freien Kopf | Gegen Zensur | Gegen Krieg
fuer einen Freien Staat voll Freier Bürger" | im Internet! | im Irak!
ret = do_actions((curr | FREE_SPEECH) & ~(NEW_COPYRIGHT_LAW | DRM | TCPA));
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: (printf) ("hello world\n");
2003-12-12 13:07 ` Jan-Benedict Glaw
@ 2003-12-12 17:17 ` Gabriel Dos Reis
0 siblings, 0 replies; 22+ messages in thread
From: Gabriel Dos Reis @ 2003-12-12 17:17 UTC (permalink / raw)
To: Jan-Benedict Glaw; +Cc: gcc
Jan-Benedict Glaw <jbglaw@lug-owl.de> writes:
| On Thu, 2003-12-11 09:01:51 -0800, Geoff Keating <geoffk@geoffk.org>
| wrote in message <jmllpjxp8g.fsf@desire.geoffk.org>:
| > Segher Boessenkool <segher@kernel.crashing.org> writes:
|
| > > That does not prevent you from declaring and defining your own
| > > printf() function (with a different prototype) though; it only requires
| > > that you make that function have external linkage.
| >
| > You mean 'internal linkage'. You can define your own function named
| > printf only if you (a) do not include stdio.h and (b) declare it
| > 'static'.
|
| Um, I think:
| - You may include <stdio.h> as long as your new printf() has
| compatible arguments. It's a Bad Thing, though, because
| declaration in <stdio.h> doesn't really belong to your new
| function.
| - You may also have your own function non-static. Then, it
| depends on link-order which function (yours or libc's) is
| used. Of course, that's horrible, too:)
If the printf function does not have an internal linkage, then it is
an undefined behaviour. That rules out both points.
-- Gaby
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Register Spilling
@ 2003-12-11 13:53 Naveen Sharma, Noida
0 siblings, 0 replies; 22+ messages in thread
From: Naveen Sharma, Noida @ 2003-12-11 13:53 UTC (permalink / raw)
To: Hans-Peter Nilsson; +Cc: gcc, Sanjiv Gupta
> On Thu, 11 Dec 2003, Naveen Sharma, Noida wrote:
>> This was the last post.
>> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg02567.html
>>
>> Do let me know if you are interesred to use this.
>
> (FWIW, I am.)
>
>> This has
>> not been checked in the mainline. For patches like this
>> to go into mainline, they should be tested for atleast 5 gcc
>> targets. I couldn't do that.
>
>Yes you can: <URL:http://gcc.gnu.org/simtest-howto.html> tells
>you how.
Thanks, I knew this but for an optimization patch, we
need to prove that it actually improves (or doesn't degrade)
code for (N >= 5) targets. This IMHO requires significant effort.
But since there is interest on this, I can do simulator
test with latest version of the patch, but not in a position to
fix problems except sh-elf.
> Certainly many of the target listed fail to build
This would probably have to be tested on tree-ssa branch now, right?
Let me check what additional problems arise.
Best Regards,
Naveen Sharma.
> should be able to find five even without including your host
> computer.
> Last I checked, arm-elf, m32r-elf, mips-elf,
> mn10300-elf, v850-elf and sh-elf worked (perhaps others do, but
> I don't test all the listed ones). Oh, you can test using MMIX
> too; put Knuth's simulator named "mmix", linked from
> <URL:http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html>
> somewhere in your PATH, use --target_board=mmixware-sim.
>
> brgds, H-P
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Register Spilling
2003-12-11 11:11 Naveen Sharma, Noida
@ 2003-12-11 13:22 ` Hans-Peter Nilsson
0 siblings, 0 replies; 22+ messages in thread
From: Hans-Peter Nilsson @ 2003-12-11 13:22 UTC (permalink / raw)
To: Naveen Sharma, Noida; +Cc: Umar Janjua, gcc, Sanjiv Gupta
On Thu, 11 Dec 2003, Naveen Sharma, Noida wrote:
> This was the last post.
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg02567.html
>
> Do let me know if you are interesred to use this.
(FWIW, I am.)
> This has
> not been checked in the mainline. For patches like this
> to go into mainline, they should be tested for atleast 5 gcc
> targets. I couldn't do that.
Yes you can: <URL:http://gcc.gnu.org/simtest-howto.html> tells
you how.
Certainly many of the target listed fail to build, but you
should be able to find five even without including your host
computer. Last I checked, arm-elf, m32r-elf, mips-elf,
mn10300-elf, v850-elf and sh-elf worked (perhaps others do, but
I don't test all the listed ones). Oh, you can test using MMIX
too; put Knuth's simulator named "mmix", linked from
<URL:http://www-cs-faculty.stanford.edu/~knuth/mmix-news.html>
somewhere in your PATH, use --target_board=mmixware-sim.
brgds, H-P
^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: Register Spilling
@ 2003-12-11 11:11 Naveen Sharma, Noida
2003-12-11 13:22 ` Hans-Peter Nilsson
0 siblings, 1 reply; 22+ messages in thread
From: Naveen Sharma, Noida @ 2003-12-11 11:11 UTC (permalink / raw)
To: Umar Janjua; +Cc: gcc, Sanjiv Gupta
> > There have been some proposals to sort them, offhand I
> don't know if there are patches available anywhere for this.
> > --
> > Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com
> >
> >
> One of them is
> http://gcc.gnu.org/ml/gcc-patches/2003-01/msg00019.html
This was the last post.
http://gcc.gnu.org/ml/gcc-patches/2003-01/msg02567.html
Do let me know if you are interesred to use this. This has
not been checked in the mainline. For patches like this
to go into mainline, they should be tested for atleast 5 gcc
targets. I couldn't do that. But I can help, if you are
interested.
Best Regards,
Naveen Sharma.
^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2003-12-12 16:56 UTC | newest]
Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-09 20:41 (printf) ("hello world\n"); Michael Elizabeth Chastain
2003-12-09 21:01 ` Dale Johannesen
2003-12-09 23:56 ` Geoff Keating
2003-12-10 9:53 ` Eyal Lebedinsky
2003-12-10 10:18 ` Andreas Schwab
2003-12-10 12:45 ` Robert Dewar
2003-12-10 13:12 ` Segher Boessenkool
2003-12-10 13:34 ` Robert Dewar
2003-12-10 13:36 ` Gabriel Dos Reis
2003-12-10 14:08 ` Joseph S. Myers
2003-12-10 14:17 ` Segher Boessenkool
2003-12-10 15:55 ` Andreas Schwab
2003-12-11 17:09 ` Geoff Keating
2003-12-11 17:39 ` Segher Boessenkool
2003-12-12 13:07 ` Jan-Benedict Glaw
2003-12-12 17:17 ` Gabriel Dos Reis
2003-12-10 14:19 ` Register Spilling Umar Janjua
2003-12-11 7:59 ` Jim Wilson
2003-12-11 9:01 ` Sanjiv Gupta
2003-12-11 11:11 Naveen Sharma, Noida
2003-12-11 13:22 ` Hans-Peter Nilsson
2003-12-11 13:53 Naveen Sharma, Noida
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).