Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <42C44FE9.2050208@x-ray.at> Date: Thu, 30 Jun 2005 22:02:49 +0200 From: Reini Urban User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; de-AT; rv:1.8b) Gecko/20050217 MIME-Version: 1.0 To: "'Cygwin List'" Subject: Re: gcc bug: convert_move -O3 References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Note-from-DJ: This may be spam Dave Korn schrieb: >>>2) Also, the function call is through a >>>pointer-to-function-taking-stdargs, but the function itself is not a >>>stdargs function. Given the wrong calling conventions, this is liable >>>to lead to both caller *and* callee cleaning the args off the stack..... >> >>Calling conventions should be determined at run-time who will pop the >>stack. > > Sorry Reini, this sentence doesn't make sense to me. AFAIUI, who will pop > the stack is determined at compiletime, according to whether the compiler > outputs a plain "ret" or a ret with a size-to-pop at the end of the > callee-function, and according to whether it emits code at the call site to > adjust %esp or not. > >>Both DLL types should be able to be loaded. > > Now you've really lost me. Are you saying that this particular dll gets > built in two versions using different calling conventions? I don't > understand here. I'm talking about FFI's, for which this hack30 was invented and used. (30 for max 30 args) FFI's need to call functions from stdcall and cdecl shared libs, so the FFI must provide both conventions. stdcall == WinAPI, cdecl e.g. most cygwin dll's. But now we are way offtopic. -- Reini Urban http://xarch.tu-graz.ac.at/home/rurban/ http://phpwiki.org/ -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/