Re: Cannot understand the following codes
- From: Ben C <spamspam@xxxxxxxxx>
- Date: 28 Mar 2006 22:54:22 GMT
On 2006-03-28, Alf P. Steinbach <alfps@xxxxxxxx> wrote:
[...]
(*(void (*)
(int,t_go_measurements[]))(stGOFuncs.p_go_Measurements))(i_,ast_);
[...]
What is possibly the type of stGOFuncs.p_go_Measurements? I did not see
its definition.
It's probably a void(*)(). But not matter what type it has, the cast is
undefined behavior in C++, and I believe also in C.
Why's it undefined behaviour? I can see that it invites undefined
behaviour, but not that it entails it-- if the value of
stGOFuncs.p_go_Measurements is a function of the correct type won't it
be OK?
.
- Follow-Ups:
- Re: Cannot understand the following codes
- From: Alf P. Steinbach
- Re: Cannot understand the following codes
- References:
- Cannot understand the following codes
- From: gpsabove
- Re: Cannot understand the following codes
- From: Alf P. Steinbach
- Cannot understand the following codes
- Prev by Date: Lex
- Next by Date: Re: Lex
- Previous by thread: Re: Cannot understand the following codes
- Next by thread: Re: Cannot understand the following codes
- Index(es):