This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: Assignment makes pointer from integer without a cast
- From: Bernard Dautrevaux <Dautrevaux at microprocess dot com>
- To: 'Lord Byron' <lordbyronbr at yahoo dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 20 Mar 2002 14:24:17 +0100
- Subject: RE: Assignment makes pointer from integer without a cast
> -----Original Message-----
> From: Lord Byron [mailto:lordbyronbr@yahoo.com]
> Sent: Wednesday, March 20, 2002 2:16 PM
> To: gcc@gcc.gnu.org
> Subject: Assignment makes pointer from integer without a cast
>
>
> I am using a function like this:
>
> (...)
>
> short int analyze(long int *id)
> {
> long int tid;
> tid = 2001;
> id = tid;
> }
>
> The gcc compiler gives a warning: "assignment makes
> pointer from integer without a cast", but if I do
> this:
> *id = tid;
> when it's running, it causes a Bus Error
Perhaps look at the code that calls analyze, and check what is passed as
parameter?
Bernard
--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel: +33 (0) 1 47 68 80 80
Fax: +33 (0) 1 47 88 97 85
e-mail: dautrevaux@microprocess.com
--------------------------------------------