tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Jon Brinkmann <jb () galileo ! apo ! nmsu ! edu>
To: tru64-unix-managers
Subject: DEC C not K&R or ANSI?
Date: Thu, 15 May 1997 16:46:44 +0000	[thread overview]
Message-ID: <96078612210411.tru64-unix-managers.marc@archive.invalid> (raw)

I've tried the following test program:

#define N   10

void main()
{
	int a[N,N], i, j;

	for (i = 0; i < N; i++)
		for (j = 0; j < N; j++)
			a[i, j] = N * i + j;
}

The compiler says:

% cc -o atest -g atest.c
/usr/lib/cmplrs/cc/cfe: Error: atest.c, line 6: Syntax Error
        int a[10,10], i, j;
        --------^

% lint atest.c
"atest.c", line 6: error: syntax error
"atest.c", line 10: warning: a undefined
"atest.c", line 10: error: illegal indirection
"atest.c", line 12: warning: main() returns random value to invocation environment

What's going on here?

Jon
---
Dr. Jon Brinkmann				Apache Point Observatory
Instrument Scientist				2001 Apache Point Road
Internet:	brinkmann@nmsu.edu		P.O. Box 59
URL:	http://www.apo.nmsu.edu/brinkmann/	Sunspot, NM 88349-0059

                 reply	other threads:[~1997-05-15 16:46 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
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