the following code generate a warning on gcc 4.2.4

warning: type qualifiers ignored on function return type

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

typedef struct testabc{int class;}* THANDLE;

const THANDLE test()
{
        THANDLE x;

        x = (THANDLE)2;

        return x;
}

int main(int argc, char **argv)
{
     const THANDLE p = test();
     return (int)p;
}


-- 
           Summary: type qualifiers ignored on function return type
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cnstar9988 at gmail dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35928

Reply via email to