Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Oct 2002 11:18:03 -0400
From:      Joe Talbott <josepht@cstone.net>
To:        freebsd-stable@freebsd.org
Subject:   gcc2.95.4 pointer not defined
Message-ID:  <20021009151803.GA14701@copper.eng.cstone.net>

next in thread | raw e-mail | index | archive | help
With the following simple program on 4.6-STABLE from Mon Sep  9 11:27:32 EDT
2002 roughly (tried as well on 4.6-STABLE from Mon Jun 24 18:24:30 EDT 2002)
both gcc 2.95.4 20020320.  Both give SIGSEGV on line 9 (*ip = 50).  gdb tells
me:

ip = (int *) 0x0

Here's the source:
/* pointer.c - pointer test */

#include <stdio.h>
#include <stdlib.h>

int main (void) {
  int *ip;

  *ip = 50;

  printf ("%d\n", *ip);

  return (EXIT_SUCCESS);
}

I've tried this on a RedHat box and a SunOS box both worked as expected.

Joe
-- 
Memory is the second thing to go as you get older.  
I forget what the first one was...
                                     -- I forgot

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021009151803.GA14701>