* falsely object-dependent references in C++?
@ 1999-02-17 19:37 Michael Poole
[not found] ` < 199902180337.WAA08351@graviton.res.cmu.edu >
1999-02-28 22:53 ` Michael Poole
0 siblings, 2 replies; 4+ messages in thread
From: Michael Poole @ 1999-02-17 19:37 UTC (permalink / raw)
To: egcs; +Cc: mark
Using a recent snapshot from CVS (from approximately 5 hours ago),
I encounter new errors when trying to compile certain C++ code (example
below). A pointer-to-member is apparently considered object-dependent
even when it is (say) a pointer to a non-virtual method. Is this the
expected behavior?
test case follows:
class reflector {
public:
void target(void);
void other(void) { void (reflector::*func)(void) = ⌖ }
}
int main(int argc, char *argv[]) {
reflector r;
return 0;
}
(the patch causing this appears to be Mark Mitchell's 18 Dec 1998
patch to gcc/cp/class.c, but I couldn't find discussion of this isuse
in the archives)
-- Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: falsely object-dependent references in C++?
[not found] ` < 199902180337.WAA08351@graviton.res.cmu.edu >
@ 1999-02-17 22:10 ` Mark Mitchell
1999-02-28 22:53 ` Mark Mitchell
0 siblings, 1 reply; 4+ messages in thread
From: Mark Mitchell @ 1999-02-17 22:10 UTC (permalink / raw)
To: poole; +Cc: egcs
>>>>> "Michael" == Michael Poole <poole@graviton.res.cmu.edu> writes:
Michael> Using a recent snapshot from CVS (from approximately
Michael> 5 hours ago), I encounter new errors when trying to
Michael> compile certain C++ code (example below). A
Michael> pointer-to-member is apparently considered
Michael> object-dependent even when it is (say) a pointer to a
Michael> non-virtual method. Is this the expected behavior?
Yes. You have to write `&reflector::target' in ANSI/ISO C++.
Michael> test case follows: class reflector { public: void
Michael> target(void); void other(void) { void
Michael> (reflector::*func)(void) = ⌖ } }
Michael> int main(int argc, char *argv[]) { reflector r; return 0;
Michael> }
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: falsely object-dependent references in C++?
1999-02-17 22:10 ` Mark Mitchell
@ 1999-02-28 22:53 ` Mark Mitchell
0 siblings, 0 replies; 4+ messages in thread
From: Mark Mitchell @ 1999-02-28 22:53 UTC (permalink / raw)
To: poole; +Cc: egcs
>>>>> "Michael" == Michael Poole <poole@graviton.res.cmu.edu> writes:
Michael> Using a recent snapshot from CVS (from approximately
Michael> 5 hours ago), I encounter new errors when trying to
Michael> compile certain C++ code (example below). A
Michael> pointer-to-member is apparently considered
Michael> object-dependent even when it is (say) a pointer to a
Michael> non-virtual method. Is this the expected behavior?
Yes. You have to write `&reflector::target' in ANSI/ISO C++.
Michael> test case follows: class reflector { public: void
Michael> target(void); void other(void) { void
Michael> (reflector::*func)(void) = ⌖ } }
Michael> int main(int argc, char *argv[]) { reflector r; return 0;
Michael> }
--
Mark Mitchell mark@markmitchell.com
Mark Mitchell Consulting http://www.markmitchell.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* falsely object-dependent references in C++?
1999-02-17 19:37 falsely object-dependent references in C++? Michael Poole
[not found] ` < 199902180337.WAA08351@graviton.res.cmu.edu >
@ 1999-02-28 22:53 ` Michael Poole
1 sibling, 0 replies; 4+ messages in thread
From: Michael Poole @ 1999-02-28 22:53 UTC (permalink / raw)
To: egcs; +Cc: mark
Using a recent snapshot from CVS (from approximately 5 hours ago),
I encounter new errors when trying to compile certain C++ code (example
below). A pointer-to-member is apparently considered object-dependent
even when it is (say) a pointer to a non-virtual method. Is this the
expected behavior?
test case follows:
class reflector {
public:
void target(void);
void other(void) { void (reflector::*func)(void) = ⌖ }
}
int main(int argc, char *argv[]) {
reflector r;
return 0;
}
(the patch causing this appears to be Mark Mitchell's 18 Dec 1998
patch to gcc/cp/class.c, but I couldn't find discussion of this isuse
in the archives)
-- Michael
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~1999-02-28 22:53 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-02-17 19:37 falsely object-dependent references in C++? Michael Poole
[not found] ` < 199902180337.WAA08351@graviton.res.cmu.edu >
1999-02-17 22:10 ` Mark Mitchell
1999-02-28 22:53 ` Mark Mitchell
1999-02-28 22:53 ` Michael Poole
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).