--- Comment #8 from bangerth at dealii dot org 2006-12-12 05:09 ---
Confirmed. The code is valid. The code would have undefined runtime
behavior if the default argument is a) actually used in a call to
commonEventProcessing, and b) is used without any further cast. Neither
is the case he
--- Comment #7 from rhaschke at techfak dot uni-bielefeld dot de
2006-12-08 08:08 ---
You are right. The return type of STATE and the actual methods differ.
Actually they should have the same type, i.e.:
typedef BaseRobot::STATE (BaseRobot::*STATE)(int);
STATE ready (int);
...
Because
--- Comment #6 from pinskia at gcc dot gnu dot org 2006-12-08 07:55 ---
(In reply to comment #5)
> Actually the return type of method "ready" was STATE in my code as.
> STATE ready ();
>
> Why should this code be invalid? It compiled and worked nicely until gcc 3.4.5
But the pointer to
--- Comment #5 from rhaschke at techfak dot uni-bielefeld dot de
2006-12-08 07:47 ---
Actually the return type of method "ready" was STATE in my code as.
STATE ready ();
Why should this code be invalid? It compiled and worked nicely until gcc 3.4.5
--
http://gcc.gnu.org/bugzilla/s
--- Comment #4 from pinskia at gcc dot gnu dot org 2006-12-07 20:18 ---
Reduced testcase:
class BaseRobot {
typedef void (BaseRobot::*PseudoState)(void);
typedef PseudoState STATE;
STATE initial ();
int ready ();
STATE stpOtherTask ();
STATE commonEventProcessing (STATE
--- Comment #3 from pinskia at gcc dot gnu dot org 2006-12-07 20:08 ---
Reducing, it has to do with default arguments.
--
pinskia at gcc dot gnu dot org changed:
What|Removed |Added
--
--- Comment #2 from rhaschke at techfak dot uni-bielefeld dot de
2006-12-07 11:58 ---
code compiles if the default argument pIdleTarget of method
commonEventProcessing
is changed to zero in line BaseRobot.ii:80118
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30108
--- Comment #1 from rhaschke at techfak dot uni-bielefeld dot de
2006-12-07 11:56 ---
code compiles if the default argument for pIdleTarget
in line BaseRobot.ii:80118 is changed to 0
--
rhaschke at techfak dot uni-bielefeld dot de changed:
What|Removed