This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
[Bug 1001344] Allow nc_test_slave for lwIP to compile for targets with 128KiB RAM.
- From: bugzilla-daemon at bugs dot ecos dot sourceware dot org
- To: ecos-patches at ecos dot sourceware dot org
- Date: Sat, 26 May 2012 20:19:25 +0100
- Subject: [Bug 1001344] Allow nc_test_slave for lwIP to compile for targets with 128KiB RAM.
- Auto-submitted: auto-generated
- References: <bug-1001344-104@http.bugs.ecos.sourceware.org/>
Please do not reply to this email. Use the web interface provided at:
http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001344
--- Comment #30 from Ilija Kocho <ilijak@siva.com.mk> 2012-05-26 20:19:15 BST ---
(In reply to comment #29)
> (In reply to comment #28)
> >
> > > I think that "volatile" is strong enough so compiler wouldn't dare to drop
> > > it even for an automatic variable.
>
> I know that isn't always true. For example, if you call
> do_some_random_computation with a constant, gcc will optimise away the
> calculation. And with some code, gcc may be able to optimise expressions into
> constants that you may not expect it to be able to - it doesn't have to be a
> literal constant, but an expression gcc has worked out can only have one value.
>
> For the case of nc_test_slave.c it does appear to be fine for that particular
> case - it's not called with a constant. But my point is that your statement is
> not generally true that volatile is guaranteed to be respected. And if it isn't
> generally true, what guarantee do we have that it will remain true in the case
> of nc_test_slave.c's use of it as well.
>
> Anyway...
>
I haven't encountered such case but I do dump checking whenever I have some
doubt.
> > > I wonder if you can use both USED and UNUSED at the same time. Given their
> > > intended functions, you should be able to, despite the English meanings
> > > implying they are in some way opposites to each other. That would deal with the
> > > uncertainty.
> >
> > Then we get ...warning: âusedâ attribute ignored... as per Comment #26.
>
> In that case we'll have to trust the GCC people will indeed continue to respect
> the volatile because we don't seem to have any alternative.
>
FAOD, are we go for commit?
Sergei, FYI it works on synthetic target too.
Ilija
--
Configure bugmail: http://bugs.ecos.sourceware.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.