home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!munnari.oz.au!manuel.anu.edu.au!dubhe.anu.edu.au!csis!mizar!dave
- From: dave@mizar.csis.dit.csiro.au (David Campbell)
- Subject: Sun C++ 2.1 PIC problem
- Message-ID: <1993Jan11.024018.3270@csis.dit.csiro.au>
- Sender: dave@mizar (David Campbell)
- Nntp-Posting-Host: mizar
- Organization: CSIRO Division of Information Technology
- Date: Mon, 11 Jan 1993 02:40:18 GMT
- Lines: 32
-
- /* Here is a program which bombs with a bus error under Sun C++ 2.1 when
- * compiled with the position independant code (PIC) option.
- *
- * I can't get the problem to occur when compiler under C; Sun C++ has its
- * own ccom which must be messed up.
- *
- * Although this program is quite useless as it stands, it is valid C++ and
- * should run.
- *
- * Compile with: CC -PIC -o x x.c
- */
-
- /* x.c */
-
- main()
- {
- "a"; /* make sure that hello world is misaligned */
- "hello world";
- }
-
- --
- +--------------------------------------------------+-----------------------+
- | Dave Campbell | UNIX & C++ |
- | Phone: + 61 6 275 0944 Fax: + 61 6 257 1052 | _--_|\ PLEASE |
- | CSIRO Division of Information Technology | / \ |
- | Centre for Spatial Information Systems | \_.--._/ <- Canberra |
- | PO BOX 664 | v |
- | CANBERRA ACT 2601 +------------------------+ |
- | AUSTRALIA | dave@csis.dit.csiro.au | |
- +-------------------------+------------------------+-----------------------+
- | Get right.....or get left. |
- +--------------------------------------------------------------------------+
-