From: dmurphy@motie.zko.dec.com (Dennis Murphy)
Subject: Re: Short Program That Crashes CC (OSF 2.1 and OSF 3.0)
Date: 26 Jan 1995 18:33:12 GMT [thread overview]
Message-ID: <3g8pt8$rkl@jac.zko.dec.com> (raw)
In-Reply-To: 3g6ldq$gav@agate.berkeley.edu
>Consider the following program fragment:
>
>extern char *foo(char *);
>
>void main()
>{
> char *siteName[128] = foo("HELLO");
>}
>
>Compiling it on both OSF 2.1 and OSF 3.0 results in the following:
>
>% cc -c j.c
>Assertion failed: (((((ty)->tree_common).code) == Struct_type) || ((((ty)->tree_common).code) == Longdouble_type && (bit_size[Target_LongDouble] == 128))), file ../../../../../../src/usr/ccs/bin/cfe/expr_cg.c, line 5270
>Fatal error in: /usr/lib/cmplrs/cc/cfe IOT/Abort trap
Here are the results using the cc -migrate compiler...
motie.zko.dec.com> cc -migrate -c t.c
cc: Warning: t.c, line 5: In the initializer for siteName[0], "foo" is not const
ant, but occurs in a context that requires a constant expression. This is an ex
tension of the language.
char *siteName[128] = foo("HELLO");
------------------------------^
motie.zko.dec.com> more t.c
extern char *foo(char *);
void main()
{
char *siteName[128] = foo("HELLO");
}
prev parent reply other threads:[~1995-01-26 18:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-01-25 23:04 Short Program That Crashes CC (OSF 2.1 and OSF 3.0) Jon Forrest
1995-01-26 18:33 ` Dennis Murphy [this message]
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