From: grunwald@foobar.cs.colorado.edu (Dirk Grunwald)
Subject: Re: ALPHA SLOWER THAN PENTIUM !!!!
Date: 1995/12/14 [thread overview]
Message-ID: <qxpbupbnnvf.fsf@foobar.cs.colorado.edu> (raw)
In-Reply-To: 4a72kn$bel@usenet.pa.dec.com
You're right. The following works, though, when compiled with ...
cc -taso -xtaso -o foo foo.c
In this case, I've changed a single typedef to be a 4-byte pointer.
-----------------------------------------------------------------------------
#include <stdio.h>
#pragma pointer_size(short)
typedef char *schar;
#pragma pointer_size(long)
main(int argc, char**argv)
{
char *woof = "woof";
char *block = argv[0];
fprintf(stderr,"size of scharp = %d\n", sizeof(schar));
fprintf(stderr,"woof = 0x%lx\n", woof);
fprintf(stderr,"block = 0x%lx\n", block);
fprintf(stderr,"woof = %s\n", woof);
fprintf(stderr,"block = %s\n", block);
}
-----------------------------------------------------------------------------
Also, the following works:
[foobar-46] cc -non_shared -taso -xtaso_short -o foo foo.c
[foobar-47] ./foo
size of scharp = 4
woof = 0x14001150
block = 0x11ffee08
woof = woof
block = ./foo
for the program...
#pragma pointer_size(long)
#include <stdio.h>
#pragma pointer_size(short)
typedef char *schar;
main(int argc, char**argv)
{
char *woof = "woof";
schar block = argv[0];
fprintf(stderr,"size of scharp = %d\n", sizeof(schar));
fprintf(stderr,"woof = 0x%lx\n", woof);
fprintf(stderr,"block = 0x%lx\n", block);
fprintf(stderr,"woof = %s\n", woof);
fprintf(stderr,"block = %s\n", block);
}
Basically, you need to insure that the libraries & your code use the
same sized pointers for the same structs. I don't see this as a big
burden.
If think you'd be better off simply using -xtaso and using the #pragma
where appropriate.
next prev parent reply other threads:[~1995-12-14 5:00 UTC|newest]
Thread overview: 43+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-06 5:00 ALPHA SLOWER THAN PENTIUM !!!! Emiliano Stesinach
1995-12-07 5:00 ` Javier Henderson
1995-12-08 5:00 ` michael
1995-12-07 5:00 ` Ron Fox
1995-12-07 5:00 ` Andrew Armstrong
1995-12-08 5:00 ` Yan-Song Chen
1995-12-09 5:00 ` Thumper!
1995-12-11 5:00 ` Dan Pop
1995-12-11 5:00 ` Robin.Fairbairns
1995-12-12 5:00 ` Michael Brodeur
1995-12-13 5:00 ` Dan Pop
1995-12-12 5:00 ` Richard Ingram
1995-12-12 5:00 ` Dirk Grunwald
1995-12-13 5:00 ` Dan Pop
1995-12-13 5:00 ` Ron Natalie
1995-12-14 5:00 ` Dan Pop
1995-12-14 5:00 ` Ron Natalie
[not found] ` <danpop.819045506@rscernix>
1995-12-15 5:00 ` Ron Natalie
1995-12-16 5:00 ` Larry Kilgallen
1995-12-17 5:00 ` Dave Cherkus
1995-12-13 5:00 ` Mike Weber
1995-12-13 5:00 ` Dirk Grunwald
1995-12-14 5:00 ` Dan Pop
1995-12-14 5:00 ` Joseph Vigneau
1995-12-14 5:00 ` Ron Natalie
1995-12-14 5:00 ` Gromit
1995-12-13 5:00 ` Dirk Grunwald
1995-12-14 5:00 ` Ron Natalie
1995-12-15 5:00 ` Dan Pop
1995-12-16 5:00 ` a little more about -xtaso and -taso in Digital UNIX Jeffrey Mogul
1995-12-22 5:00 ` ALPHA SLOWER THAN PENTIUM !!!! Alan H. Martin
1995-12-13 5:00 ` Mike Weber
1995-12-14 5:00 ` David Mosberger-Tang
1995-12-14 5:00 ` Dirk Grunwald [this message]
1995-12-15 5:00 ` Dirk Grunwald
1995-12-07 5:00 ` Dan Pop
1995-12-07 5:00 ` Gromit
1995-12-08 5:00 ` John Hascall
1995-12-07 5:00 ` Rob Young
1995-12-07 5:00 ` Yan-Song Chen
1995-12-08 5:00 ` Yan-Song Chen
1995-12-12 5:00 ` dave pierson
[not found] <199512110641.WAA20124@helix.net>
1995-12-12 5:00 ` michael
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