This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/14333] New: __stdcall in function declaration in structure ignored?


This code fragment gives 'warning: initialization from incompatible pointer type':

static void __stdcall example_func(void)
{
}

struct {
        void __stdcall (*example_method)(void);
} y = {
        .example_method = example_func,
};

Removing the __stdcall from the struct declaration does not make the warning
go away, whereas removing the __stdcall from the function declaration does.
Which makes me believe that the __stdcall in the struct declaration is being
ignored.

Am I doing something wrong?

-- 
           Summary: __stdcall in function declaration in structure ignored?
           Product: gcc
           Version: 3.3.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: buytenh at gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: i386-mingw32
  GCC host triplet: i386-redhat-linux
GCC target triplet: i386-mingw32


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]