[comp.sys.mips] Random error message from DECstation compiler

eru@tnvsu1.tele.nokia.fi (07/05/90)

[repost; I have reason to believe the previous try didn't get out]

I have large C files where I use the "new-style" function declarations.
Sometimes, seemingly at random, the Mips compiler on the DECstation 3100
(running Ultrix, what else) complains about a function, saying something
like this:

ccom: Error: chktype.c, line 2356: number of arguments doesn't agree with proto
type description
      {
      ^

There is nothing wrong with the function. Last time it actually was static,
did not have a prototype, and compiled fine before I added another
function many functions above it:

static void number_signals(register chk_numbered_sig_list_t lista,
			   register unsigned count)

{
    while(lista != NILANY) {
	lista->d.number = count;
	lista = lista->next;
    }
}

Adding or modifying a function in the same file seems to trigger the bug.
I can usually get rid of it by changing the declaration into the "old style".
The compiler pass programs have the number 1.31 appended, so I suppose
that is the version of the compiler.

Has anyone else seen this? Any general cure?

Erkki Ruohtula     / Nokia Telecommunications
eru@tele.nokia.fi / P.O. Box 33 SF-02601 Espoo, Finland

meissner@osf.org (Michael Meissner) (07/09/90)

In article <691@mjolner.tele.nokia.fi> eru@tnvsu1.tele.nokia.fi
writes:

| [repost; I have reason to believe the previous try didn't get out]
| 
| I have large C files where I use the "new-style" function declarations.
| Sometimes, seemingly at random, the Mips compiler on the DECstation 3100
| (running Ultrix, what else) complains about a function, saying something
| like this:
| 
| ccom: Error: chktype.c, line 2356: number of arguments doesn't agree with proto
| type description
|       {
|       ^
| 
| There is nothing wrong with the function. Last time it actually was static,
| did not have a prototype, and compiled fine before I added another
| function many functions above it:
| 
| static void number_signals(register chk_numbered_sig_list_t lista,
| 			   register unsigned count)
| 
| {
|     while(lista != NILANY) {
| 	lista->d.number = count;
| 	lista = lista->next;
|     }
| }
| 
| Adding or modifying a function in the same file seems to trigger the bug.
| I can usually get rid of it by changing the declaration into the "old style".
| The compiler pass programs have the number 1.31 appended, so I suppose
| that is the version of the compiler.
| 
| Has anyone else seen this? Any general cure?

Yea, switch compilers.  Revision 1.31 of the MIPS compiler tools do
not support prototypes, though it appears that somebody had started
the work.  I believe that the 2.00 compiler suite will support ANSI a
little better, though I don't know the exact ins and outs.

GCC from the Free Software Foundation does support prototypes, but the
current version released by the FSF does not adequately support the
MIPS chip.  I have sent in patches to fix most of the problems, and
they will be incorported into revision 1.38, though the full debug
support won't be added until revision 2.00 (-g will only give you line
numbers with 1.38).  (Note I will be on vacation starting July 12th
EDT).

--
Michael Meissner	email: meissner@osf.org		phone: 617-621-8861
Open Software Foundation, 11 Cambridge Center, Cambridge, MA

Do apple growers tell their kids money doesn't grow on bushes?