Using libc-5.3.38:
gcc -E test.c | sed -ne '/^.*[^ \t].*$/p' > test.out
Produces:
# 1 "test.c" 2
void main() {
sigset_t s;
sigemptyset(&s);
sigaddset(&s, 10 );
sigprocmask(0 , &s, ((void *) 0) );
}
Whereas:
gcc -O -E test.c | sed -ne '/^.*[^ \t].*$/p' > test.out
Produces:
# 1 "test.c" 2
void main() {
sigset_t s;
((*( &s ) = 0L), 0) ;
sigaddset(&s, 10 );
sigprocmask(0 , &s, ((void *) 0) );
}
I don't think that "((*( &s ) = 0L), 0) ;" is going to work very well with
an array!!
This is due to the __OPTIMIZE__ section in /usr/include/signal.h
My solution was simply to get rid of the __OPTIMIZE__ section.