This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Re: Compilation error?
- From: Andreas Schwab <schwab at suse dot de>
- To: "Bonzini" <bonzini at gnu dot org>
- Cc: <gcc at gcc dot gnu dot org>, <libc-alpha at sources dot redhat dot com>,<beebe at math dot utah dot edu>
- Date: Tue, 10 Dec 2002 10:32:53 +0100
- Subject: Re: Compilation error?
- References: <CMM.0.92.0.1039283053.beebe@suncore.math.utah.edu><009d01c29fe8$ea1c56b0$89101897@bonz>
"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."