P
Phil Carmody
#include <stdio.h>
void do_stuff(FILE **pfp) { fputs("did something!\n", *pfp); }
void get_stuff_done(void) { do_stuff(&stdin); }
GCC's no help (spoiler*epsilon: then again, given the dodginess, I can't
imagine how it would detect it without unacceptable overheads):
phil@duospaz:tmp$ gcc -ansi -pedantic -Wall -Wextra -c crap.c
phil@duospaz:tmp$ gcc -std=c99 -Wall -Wextra -c crap.c
phil@duospaz:tmp$
Was I slow?
No point leaving you on the hook unnecessarily. Gentle and complete
spoilers both in headers.
Phil
void do_stuff(FILE **pfp) { fputs("did something!\n", *pfp); }
void get_stuff_done(void) { do_stuff(&stdin); }
GCC's no help (spoiler*epsilon: then again, given the dodginess, I can't
imagine how it would detect it without unacceptable overheads):
phil@duospaz:tmp$ gcc -ansi -pedantic -Wall -Wextra -c crap.c
phil@duospaz:tmp$ gcc -std=c99 -Wall -Wextra -c crap.c
phil@duospaz:tmp$
Was I slow?
No point leaving you on the hook unnecessarily. Gentle and complete
spoilers both in headers.
Phil