SUN4 / SUNOS4.0 / C Compiler Problems

ekrell at ulysses.att.com ekrell at ulysses.att.com
Sat Dec 3 09:54:31 AEST 1988


The optimizer for the sparc is known to be broken, so avoid using it.  I
couldn't get X Windows 11.3 running until I removed the -O flag from the
Makefiles.

the "Watchdog Reset" problem with the 4/110 is a hardware bug for which
Sun has a software workaround (a new trap.o kernel module). This will
Prevent the system from crashing.

>                char argv[SOMEARGS][BUFSIZ];
>                foo (argv);

>        foo (argv)
>        char **argv;
>        {
>                printf( "%s\n", argv[1]);
>        }

You didn't expect this to work, did you?  How does the function know what
offset to generate for argv[1]?  It has to know the second dimension of
the matrix in order to generate right offsets.

Try declaring the argument in foo() as "char argv[][BUFSIZ]".



More information about the Comp.sys.sun mailing list