* DEC C compiler bug - Digital Unix 4.0
@ 1996-08-06 4:00 Mark C Favas - SysAd
1996-08-07 4:00 ` John Kohl
0 siblings, 1 reply; 3+ messages in thread
From: Mark C Favas - SysAd @ 1996-08-06 4:00 UTC (permalink / raw)
I've just isolated the following code that tickles a bug in DEC's cc compiler.
Hardware: Digital AlphaStation 500/333
Operating System: Digital Unix V4.0 (rev 386)
Compiler: DEC C V5.2-023
The code fragment:
#define PPROTO Py_PROTO
#define Py_PROTO(x) x
static int halfbinop PPROTO((int *, int *, char *, int **,
int * (*) PPROTO((int *, int *)), int ));
when compiled with "cc -c PROTO_bug.c" produces the following error message:
cc: Error: PROTO_bug.c, line 3: Missing ")".
static int halfbinop PPROTO((int *, int *, char *, int **,
---------------------^
If I compile with the flag "-oldc", there is no error. The default is to use the
GEM C compiler (-newc), so it looks as though the error is in
/usr/lib/cmplrs/cc/gemc_cc. The error also occurs if I use the "-migrate" flag
to invoke the GEM C compiler. I can compile this on another machine running
Digital Unix V3.2 and an earlier version of the GEM compiler without error.
Interestingly, if I change either of the PPROTO keywords in the forward
definition of halfbinop to Py_PROTO it compiles without error.
Has anyone come across this one, or got any comments to make (DEC?)?
Thanks,
Mark
--
Email - mark@chem.uwa.edu.au ,-_|\ Mark C Favas
Phone - +61 9 380 3482 / \ Department of Chemistry
Fax - +61 9 380 1005 ---> *_,-._/ The University of Western Australia
v Nedlands
Loc - 31.97 S, 115.81 E Western Australia 6009
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: DEC C compiler bug - Digital Unix 4.0
1996-08-06 4:00 DEC C compiler bug - Digital Unix 4.0 Mark C Favas - SysAd
@ 1996-08-07 4:00 ` John Kohl
1996-08-12 4:00 ` Daniel Lewis
0 siblings, 1 reply; 3+ messages in thread
From: John Kohl @ 1996-08-07 4:00 UTC (permalink / raw)
Changing your first line to:
#define PPROTO(x) Py_PROTO(x)
makes it work for me. Is this an acceptable workaround?
(BTW, I'm fuzzy on my ANSI C--I don't know offhand whether what you're
trying to do in your original case is legitimate)
--
John Kohl <jtk@atria.com> or <jtkohl@mit.edu>
working for but not representing: Atria Software
sometimes hacking on: NetBSD/i386
Member of the League for Programming Freedom--inquire at league@prep.ai.mit.edu
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: DEC C compiler bug - Digital Unix 4.0
1996-08-07 4:00 ` John Kohl
@ 1996-08-12 4:00 ` Daniel Lewis
0 siblings, 0 replies; 3+ messages in thread
From: Daniel Lewis @ 1996-08-12 4:00 UTC (permalink / raw)
John Kohl (jtk@atria.com) wrote:
: Changing your first line to:
: #define PPROTO(x) Py_PROTO(x)
On seeing the original post, I was reminded of two famous sayings:
C.A.R. Hoare: "And simplicity is the unavoidable price which we must pay
for reliability."
Attributed to A. Einstein: "Things should be as simple as possible and no
simpler."
D. Lewis
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-08-12 4:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-08-06 4:00 DEC C compiler bug - Digital Unix 4.0 Mark C Favas - SysAd
1996-08-07 4:00 ` John Kohl
1996-08-12 4:00 ` Daniel Lewis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox