[cfe-dev] cfe-dev Digest, Vol 83, Issue 87
Tim Toomay
toomayt at toomaytech.com
Sun May 18 19:00:34 PDT 2014
On 5/18/2014 2:31 PM, cfe-dev-request at cs.uiuc.edu wrote:
> Message: 1
> Date: Sun, 18 May 2014 18:11:18 +0200
> From: Aitor San Juan<aitor.sj at opendeusto.es>
>
>
>
> Let's consider the following:
> char *s = "string literal";
> char pwd[] = "password";
> char *p;
> *p = s; (1)*
> *p = pwd; (2)*
The first thing either statment does is to derefrence p, an unitialized
pointer, by resolving the expression *p. That gives you an lvalue or
crashes. You want to discover that p is uninitialized and warn I
guess. Sorry if I am stating the obvious.
-- Tim Toomay Toomay Technologies Inc www.ToomayTech.com *****
More information about the cfe-dev
mailing list