Article View: gnu.gcc.bug
Article #27built-in recognition bug in gcc 2.2.2
From: Jason Merrill
Date: Sat, 31 Oct 1992 22:48
Date: Sat, 31 Oct 1992 22:48
39 lines
1401 bytes
1401 bytes
When building the GNU m4-1.0 distribution, the obstack.c compile died with
the error
obstack.c:26: conflicting types for `abort'
<built-in>:0: previous declaration of `abort'
Now, according to c-decl.c,
...
else if (TREE_CODE (olddecl) == FUNCTION_DECL
&& DECL_BUILT_IN (olddecl))
{
if (!TREE_PUBLIC (newdecl))
{
...
}
else if (!types_match)
warning_with_decl (newdecl, "conflicting types for built-in function `%s'");
}
...
So it seems to me this should be a warning, not an error. So I stepped
through here with gdb, and found that although olddecl->decl->filename was
set to "<built-in>", olddecl->decl->bit_field_flag was 0, indicating that
the function was not built in...
Here is an input file which reproduces the bug:
-----
int abort();
main()
{
}
-----
--
Jason Merrill
jason@jarthur.claremont.edu
Technical Details
Message-ID:
<1992Oct31.224846.10131@muddcs.claremont.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!caen!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!jarthur.claremont.edu!jasonShow Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!elroy.jpl.nasa.gov!sdd.hp.com!caen!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!jarthur.claremont.edu!jason From: jason@jarthur.claremont.edu (Jason Merrill) Subject: built-in recognition bug in gcc 2.2.2 Message-ID: <1992Oct31.224846.10131@muddcs.claremont.edu> Sender: gnulists@ai.mit.edu Organization: Harvey Mudd College, Claremont, CA 91711 Distribution: gnu Date: Sat, 31 Oct 1992 22:48:46 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 40