mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-22 07:30:54 +00:00
22 lines
705 B
C++
22 lines
705 B
C++
/* Deviance Test 4.2.3.1: Ensure illegal forward references are detected */
|
|
|
|
main ()
|
|
{
|
|
int i;
|
|
aPtr x; /* forward reference to user-defined type */
|
|
struct complex y; /* forward reference to type tag */
|
|
struct complex { float real;
|
|
float imag; };
|
|
|
|
i = F1 ('a'); /* forward reference to prototyped function */
|
|
j = 3 * 7; /* forward reference to variable */
|
|
v.one = 1; /* forward reference to component */
|
|
}
|
|
|
|
/*****************************************************************************/
|
|
|
|
int F1 (char ch)
|
|
{
|
|
return (int) ch;
|
|
}
|