delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1998/05/17/03:12:09

From: dph-man AT iName DOT com (Peter Hawkins)
Subject: __attribute((stdcall)) on member functions of C++ classes...
17 May 1998 03:12:09 -0700 :
Message-ID: <355E63A0.A4121E9B.cygnus.gnu-win32@iname.com>
Mime-Version: 1.0
To: gnu-win32 AT cygnus DOT com

Hi there...

Why does G++ ignore the __attribute__((stdcall)) in the following:

#include <iostream.h>

class theclass
{
 public:

void __attribute__((stdcall)) testfunc(int a, int b);
};

void __attribute__((stdcall)) theclass::testfunc(int a, int b)
{
 cout << a << b;
}

main()
{
 theclass a;
a.testfunc(0,1);
}

Rather than actually using the stdcall calling convention, GCC just
issues a warning: 'stdcall' attribute directive ignored.

My question is... why? What's stopping class member functions from using
the stdcall calling convention?

:-)
dph-man

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019