mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 23:29:27 +00:00
16 lines
440 B
C++
16 lines
440 B
C++
/* Deviance Test 4.6.3.1: Ensure illegal pointer initializations are detected */
|
|
|
|
main ()
|
|
{
|
|
int i2 [5], i1 = 5;
|
|
|
|
static int i1Ptr = i2; /* can't take address of local array */
|
|
extern int i2Ptr = &i2 [3];
|
|
|
|
register float f1 [10]; /* no such thing as register arrays */
|
|
|
|
float *fptr = (float) (i1 - 1.0); /* expression is not integral constant */
|
|
|
|
printf ("Failed Deviance Test 4.6.3.1\n");
|
|
}
|