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

Reply via email to