🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #1931

Re: MIPS varargs (Was Re: Reality check)

#1931
From: Ron Guilmette
Date: Sat, 03 Nov 1990 20:59
43 lines
2252 bytes
In article <14322@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>In article <108077@convex.convex.com> gargulak@mozart.convex.com (Tom Gargulak) writes:
>>For example, the following two functions will have different codegen.
>>	test(Xa_alist) {}
>>	test(va_alist) {}
>>No include files required.
>
>Well, that's clearly wrong behavior, since both these are merely functions
>having a single int-valued parameter.

I think that it's wrong to say that that's wrong behavior.

What's wrong with it?

Are you assuming that the generated code not only is different, but also
that the differences are detectable (other than simply speed differences)?

He didn't say that the *different* code voilated any ANSI requirement
for run-time behavior.

If a va_list falls in the forest, and there is nobody there to hear it,
does this violate ANSI rules? :-)

I happen to be attuned to this issue because I've been implementing
support for AT&T's new debug format (DWARF) in GCC.

In order to generate *proper* debugging information, I have to check
each function to see if its first parameter has a particular *special*
name (which will indicate that it is an old-style varargs function).

Now, does the fact that I generate different debugging information for
functions whose first parameter is named `foobar' make the compiler
that I'm working on non-standard?  I doubt it.

Would that fact that a given compiler generated different executable
code for functions whose first parameter was named `foobar' in and
of itself make that compiler non-standard.  I don't think so.

-- 

// Ron Guilmette  -  C++ Entomologist
// Internet: rfg@ncd.com      uucp: ...uunet!lupine!rfg
// Motto:  If it sticks, force it.  If it breaks, it needed replacing anyway.
Technical Details
Message-ID: <2400@lupine.NCD.COM>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!sgi!decwrl!infopiz!lupine!rfg
References: <14199@smoke.BRL.MIL> <108077@convex.convex.com> <14322@smoke.brl.mil>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watserv1!watmath!att!att!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!mips!sgi!decwrl!infopiz!lupine!rfg
From: rfg@NCD.COM (Ron Guilmette)
Newsgroups: comp.std.c
Subject: Re: MIPS varargs (Was Re: Reality check)
Message-ID: <2400@lupine.NCD.COM>
Date: 3 Nov 90 20:59:15 GMT
References: <14199@smoke.BRL.MIL> <108077@convex.convex.com> <14322@smoke.brl.mil>
Organization: Network Computing Devices, Inc., Mt. View, CA
Lines: 43