Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: Jeff Sullivan <jps@zk3.dec.com>
To: Ming-Yen Hsu <myhsu@mail.sysnet.net.tw>
Subject: Re: [Help]gcc ignored #pragma pack on DEC/OSF1 4.0B
Date: 1997/12/30	[thread overview]
Message-ID: <34A918FF.EE41F28F@zk3.dec.com> (raw)
In-Reply-To: 689ng7$ja2@news.seed.net.tw

[-- Attachment #1: Type: text/plain, Size: 1342 bytes --]

You should try using the ANSI modes of the default compiler (DEC C)
to compile code with preprocessor directives not in column 1. You
may use either -std (relaxed ANSI) or -std1 (strict ANSI).

That feature, and others are ANSI only and are not supported in the
common (or K&R mode). The following program will demonstate:

% cat t.c
# include <stdio.h>
#define OK 1

void main() {
  #if OK == 1
  printf("Expected result in -std/-std1\n");
  #else
  printf("Unexpected result in -std0\n");
  #endif
}

% cc t.c; a.out
cc: Warning: t.c, line 5: # not in column 1 is ignored, skipping to end
of line.
  #if OK == 1
--^
cc: Warning: t.c, line 7: # not in column 1 is ignored, skipping to end
of line.
  #else
--^
cc: Warning: t.c, line 9: # not in column 1 is ignored, skipping to end
of line.
  #endif
--^
Expected result in -std/-std1
Unexpected result in -std0

% cc t.c -std; a.out
Expected result in -std/-std1

% cc t.c -std1 ; a.out
Expected result in -std/-std1


I think you will find that the default compiler (DEC C) in V4.0B is
much improved over gcc in both features and runtime performance.
See http://www.unix.digital.com/ for more info.

If you have further questions, let me know.

-Jeff
-- 
Jeff Sullivan | Digital Equipment Corp | sullivan@decc.enet.dec.com
DEC C and C++ | Nashua, NH  ZK3-2/2X09 |     or     jps@zk3.dec.com

[-- Attachment #2: Card for Jeff Sullivan --]
[-- Type: text/x-vcard, Size: 343 bytes --]

begin:          vcard
fn:             Jeff Sullivan
n:              Sullivan;Jeff
org:            Digital Equipment Corporation
email;internet: jps@zk3.dec.com
title:          Principal Software Engineer
note;quoted-printable:http://www.digital.com/=0D=0A=
	
x-mozilla-cpt:  ;0
x-mozilla-html: FALSE
version:        2.1
end:            vcard


  reply	other threads:[~1997-12-30  5:00 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-12-30  5:00 [Help]gcc ignored #pragma pack on DEC/OSF1 4.0B Ming-Yen Hsu
1997-12-30  5:00 ` Jeff Sullivan [this message]
1997-12-31  5:00   ` John Kohl
1998-01-05  5:00     ` Joe Mario
1998-01-06  5:00       ` Tim Mooney
1998-01-06  5:00         ` Kevin Jacobs
1998-01-08  5:00           ` Jeff Sullivan
1998-01-08  5:00         ` Jeff Sullivan
1998-01-13  5:00         ` Jeff Sullivan
1998-01-16  5:00           ` Tim Mooney
1998-01-05  5:00     ` Jeff Sullivan
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox