Path: utzoo!attcan!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!sun-barr!rutgers!att!cbnewsh!warren From: warren@cbnewsh.att.com (warren.a.montgomery) Newsgroups: comp.lang.c++ Subject: Re: AT&T 2.1 and stdargs Summary: Turn off optimization when using stdargs on a Sparc machine Message-ID: <1990Sep23.162833.2936@cbnewsh.att.com> Date: 23 Sep 90 16:28:33 GMT References: <1990Sep19.062219.29519@cs.nott.ac.uk> Organization: AT&T Bell Laboratories Lines: 19 My work group spent quite a bit of time tracking down problems with the use of stdargs on a Sparc based machine. We concluded that you cannot compile code that uses stdargs with the optimizer on a Sparc based Sun. The trouble appears to be that the optizer uses the name of the arguments to a function to deterine whether or not the function may take varying arguments, and if so whether it needs to be compiled so as to preserve the argument stack for use by the varargs or stdargs library. The C++ name mangling procedure does not always produce the right "magic" parameter name to trigger the generation of the varying arguments code, and the call will fail if it isn't generated correctly. I believe that the optimization only has to be disabled on the compilation of the varying arguments function itself, not the things that call it. -- Warren Montgomery att!ihlpf!warren