www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1993/04/25/18:26:08

Date: Sat, 24 Apr 93 22:15:50 EST
From: Matthew DOT Hunt AT p2 DOT f3 DOT n2616 DOT z1 DOT fidonet DOT org (Matthew Hunt)
Subject: Null pointers in CC1PLUS
To: djgpp AT sun DOT soe DOT clarkson DOT edu

Hello!

I am having problems compiling HELLO.CXX on my 386sx/16 with 1 MB of RAM. 
Here is the source code I am trying to compile:

=== CUT ===

#include <iostream.h>

int main(void)
{
    cout << "Hello, world!\n";

    return 0;
}

=== ENDCUT===

When I try to compile it with the command line:

gcc -O -v -Wall hello.cxx

(and variations thereof, including both -O2 and no optimization) I get the
following output:

=== CUT ===

Reading specs from c:/gcc/lib/specs
gcc version 2.2.2
 c:/gcc/bin/cpp.exe -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2
-D__cplusplus -Dunix -Di386 -D__unix__ -D__i386__ -D__unix -D__i386
-D__OPTIMIZE__ -Wall -D__GO32__ -D__MSDOS__ -DGO32 -DMSDOS -noprecomp
hello.cxx d:/cc000066.i
GNU CPP version 2.2.2 (80386, BSD syntax)
 c:/gcc/bin/cc1plus.exe d:/cc000066.i -quiet -dumpbase hello.cc -O -Wall
-version -o d:/cc000066.s
GNU C++ version 2.2.2 (80386, BSD syntax) compiled by GNU C version 2.2.2.
Segmentation violation in pointer 0x00000000 at 18:14fd
Segmentation violation in pointer 0x00000000 at 18:14f3
Segmentation violation in pointer 0x00000000 at 18:14f3
Segmentation violation in pointer 0x00000000 at 40:2d36f
Exception 14 at eip=2d36f

=== ENDCUT ===

Can somebody help me out with this problem?

Best Wishes,
Matthew

CC: UUCP  1:1/31.0
CC: Craig Haynal  1:2616/3.1

--- GoldED 2.41
 * Origin: WayneWare * Johnstown, PA (1:2616/3.2)
--  
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
            (Gated via FidoNet Node 1:1/31)
 Matthew Hunt      Internet: Matthew DOT Hunt AT p2 DOT f3 DOT n2616 DOT z1 DOT fidonet DOT org

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019