tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] More fun with comparison between pointer and integer.


From: Rob Landley
Subject: Re: [Tinycc-devel] More fun with comparison between pointer and integer...
Date: Wed, 5 Sep 2007 18:29:04 -0500
User-agent: KMail/1.9.6

On Wednesday 05 September 2007 6:17:38 pm Rob Landley wrote:
> Hang on, so when char *a is constant, (int)a is _not_ constant?
>
> How does that work?

Looking back at it, I think what the standard means is since the actual 
address of the char * is supplied by the linker, than despite it being a 
run-time constant it can't be known at compile time.

However, we can know that it's nonzero which is all && and || need, so I can 
teach _them_ about propogating constant values from pointers.

Rob
-- 
"One of my most productive days was throwing away 1000 lines of code."
  - Ken Thompson.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]