Hi everyone,
In my opinion this issue is not mips compiler bug.
Simulating this issue on i386, amd64, mips and mipsel architectures I got same
results.
In definition of struct sigaction there is a difference between architectures
due to the error occur.
Definition for mips:
struct sigaction
{
unsigned int sa_flags;
union
{
__sighandler_t sa_handler;
void (*sa_sigaction) (int, siginfo_t *, void *);
}
__sigaction_handler;
__sigset_t sa_mask;
void (*sa_restorer) (void);
int sa_resv[1];
};
Definition for i686:
struct sigaction
{
union
{
__sighandler_t sa_handler;
void (*sa_sigaction) (int, siginfo_t *, void *);
}
__sigaction_handler;
__sigset_t sa_mask;
int sa_flags;
void (*sa_restorer) (void);
};
If first attribute is not union, struct can not be initialized with {{0}} with
g++ compiler.
For that reason {} should be used for struct initialization.
This will properly initialize instance of structure sigaction on both
architectures.