This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Compilation error?


"Bonzini" <bonzini@gnu.org> writes:

|> Compilation of the regex matcher from glibc 2.3 fails under SGI IRIX 6.5
|> with the native compiler.  The reported error is:
|> 
|> > cc-1119 c89: ERROR File = regcomp.c, Line = 2029
|> >   The "return" expression type differs from the function return type.
|> >
|> >               return *err = REG_ESPACE, NULL;
|> >                      ^
|> 
|> This is because the returned type for the function is a pointer to struct,
|> which is compatible with NULL but not with REG_ESPACE.  I ask to the ISO C
|> minds on gcc@gcc.gnu.org whether gcc is misreporting the bug, and tell the
|> libc-alpha folks that I'll prepare a patch in a day or two.

This is obviously a bug in the sgi compiler.  The type of (*err =
REG_ESPACE) is completely irrelevant here, since it's the left operand of
a comma expression.

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]