From: Groepaz (groepaz_at_gmx.net)
Date: 2003-09-03 08:33:40
On Monday 01 September 2003 21:18, Ullrich von Bassewitz wrote: > On Mon, Sep 01, 2003 at 08:53:30PM +0200, Groepaz wrote: > > many thanks, that explains a lot :) now i'm curious though that gcc > > generates working code for some combinations that should not work > > according to your explaination - and doesnt even throw a warning (at > > -Wall -W)... mmmh :) should i try --ansi --pedantic too? :=P > > What do you mean with "some combinations that should not work"? At least in > a declaration, all combinations are supposed to work. i mean combinations which are indeed supposed to _compile_, but which then should not lead to "working" code. for example assigning a value to something declared "const" inside a function body should compile fine, but the resulting code is bogus (since something constant cannot be changed).... i think that the "problem" here is that gcc doesnt hunour the const keyword at all, except placing variables in .rodata if they are const - which in turn means that const has no effect in program running completely in ram. (that raycaster code is originally for the GBA and its trying to save ram as much as possible by declaring a lot of things const).... mmmh...could you explain how exactly cc65 deals with the const keyword then? does it do anything else than placing const data in .rodata? also, maybe the compiler could throw a warning if an assignment is made to a constant lvalue (which doesnt quite make sence :=)) ? gpz ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo_at_musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2003-09-03 08:39:08 CEST