Pointer arithmetic and iterations
[Thread Prev] | [Thread Next]
- Subject: Pointer arithmetic and iterations
- From: nml <arumakanil@xxxxxxxxx>
- Reply-to: myrddin-dev@xxxxxxxxxxxxxx
- Date: Mon, 4 Dec 2017 10:33:25 +0800
- To: myrddin-dev@xxxxxxxxxxxxxx
Hi,
Myrddin doesn't seem to support pointer arithmetic.
What is the idiomatic way to express the following C code? Any examples?
typedef void (*initfn_t)(void);
> extern initfn_t *__init_start__;
> initfn_t fp;
> for (fp = __init_start__; fp < __init_end__; fp++) {
> fp();
> }
and
>
> initfn_t fp = (initfn_t *)__init_start__;
> while (*fp++) {
> fp();
> }
--
mura
| Re: Pointer arithmetic and iterations | Ori Bernstein <ori@xxxxxxxxxxxxxx> |
- Prev by Date: Re: Smaller binary size
- Next by Date: Re: Pointer arithmetic and iterations
- Previous by thread: Re: What is the expected section for type descriptors?
- Next by thread: Re: Pointer arithmetic and iterations
- Index(es):