Article View: gnu.g++.bug
Article #402static functions
From: Tom Keffer
Date: Sat, 09 Sep 1989 23:51
Date: Sat, 09 Sep 1989 23:51
40 lines
1665 bytes
1665 bytes
Michael,
This goes back to an earlier discussion we had as to whether
-finline-functions should be the default. Consider the following:
#ifdef DEBUG
#define Inline static
#else
#define Inline inline
class Foo {
void bar();
};
Inline bar() { /* a definition */ }
This is how I have been using the inline qualifier: make it static if
you are debugging.
Now the problem. Cfront 2.0 squawks at this with the error "static
specified for qualified name bar()". If the definition is static,
the declaration must be static (in which case "this" is not defined
under 2.0), clearly not what we mean here. Personally, I think this
is stupid, but it's their compiler.
So, the choice is whether to make g++ compliant, or ignore the whole
thing.
A cavaet: I have not tested this myself because I do not have access
to a 2.0 compiler. It is being passed on by a user of my vector
package.
-tk
---
Dr. Thomas Keffer | Internet: keffer@sperm.ocean.washington.edu
School of Oceanography | BITNET: keffer%sperm.ocean.washington.edu@UWAVM
Univ. of Washington, WB-10 | uucp: uw-beaver!sperm.ocean.washington.edu!keffer
Seattle, WA 98195 | Telemail: T.KEFFER/OMNET
(206) 543-6455
Technical Details
Message-ID:
<8909092351.AA14187@sperm.ocean.washington.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!SPERM.OCEAN.WASHINGTON.EDU!kefferShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!SPERM.OCEAN.WASHINGTON.EDU!keffer From: keffer@SPERM.OCEAN.WASHINGTON.EDU (Tom Keffer) Newsgroups: gnu.g++.bug Subject: static functions Message-ID: <8909092351.AA14187@sperm.ocean.washington.edu> Date: 9 Sep 89 23:51:31 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 40