This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/30072] New: Return type of implicitly declared functions
- From: "bhaskar dot priya at wipro dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 5 Dec 2006 11:06:40 -0000
- Subject: [Bug c/30072] New: Return type of implicitly declared functions
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Return type of implicitly declared functions
Return type of an implicitly declared function is supposed to be int (signed
that is)
//temp.c
f(int i)
{
if (g(i) < 0)
printf("dead");
}
the return type of g(int) is int (normally)
but when the parameter list of an implicitly declared function consists of only
unsigned ints then the return type reported by the cc1 (parser) is unsigned int
(instead of signed)
//temp.c
f(unsigned int i)
{
if (g(i) < 0)
printf("dead");
}
the return type of g(unsigned int) becomes unsigned int :( somehow
If anyone has a clue on how to remove this and force the return type to be int
no matter what, please?
--
Summary: Return type of implicitly declared functions
Product: gcc
Version: 3.4.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: bhaskar dot priya at wipro dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30072