This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
Re: Problem with div (1.9.0, arm7tdmi)
- To: Ingo Krabbe <i dot krabbe at dokom dot net>
- Subject: Re: Problem with div (1.9.0, arm7tdmi)
- From: "Lewin A.R.W. Edwards" <larwe at larwe dot com>
- Date: Tue, 03 Jul 2001 12:36:57 -0400
- Cc: <newlib at sources dot redhat dot com>,<gcc-help at gcc dot gnu dot org>
- References: <4.3.2.7.2.20010703111538.00b3b0f0@mail.verizon.net>
> > Thanks for this suggestion, I didn't think of it. Returning structures has
> > "just worked" in other contexts for me, I didn't suspect it as the problem.
> >
>It does not need to be a problem, but I think its more likely than
>breaking in the middle of a function, except there is a serious bug in the
>processor or in the newlib implementation of div. I just thought of
>locating the problem.
I mean I wouldn't have thought of looking there (I spent too many hours
looking at this code...)..
Anyway, the results of testing:
div_t y = div(a,b);
this code works.
I guess this is a compiler bug? Like I say, before this has "just worked"
for me (accessing div().member directly) so I haven't given any thought to
its legality. Also I have seen it in numerous code snippets. What is the
legality of this construct?
-- Lewin A.R.W. Edwards
Embedded Engineer, Digi-Frame Inc.
Work: http://www.digi-frame.com/
Tel (914) 937-4090 9am-6:30pm M-F ET
Personal: http://www.larwe.com/ http://www.zws.com/
"Far better it is to dare mighty things, to win glorious triumphs, even
though checkered by failure, than to rank with those poor spirits who
neither enjoy much nor suffer much, because they live in the gray twilight
that knows not victory nor defeat."
(Theodore Roosevelt)