Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c > #104087
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Standard Headers |
| Date | 2017-02-17 20:31 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <87mvdkeeyt.fsf@bsb.me.uk> (permalink) |
| References | <o878ij$840$1@dont-email.me> <ae484509-68c0-49cb-88de-ed97918b3400@googlegroups.com> <74a56ac9-492c-4535-bfa1-2b1d278ab07f@googlegroups.com> |
luser droog <luser.droog@gmail.com> writes:
<snip>
> Even better: error messages for undefined symbols could suggest which std
> header the programmer forgot to include.
Like gcc does:
x.c: In function ‘main’:
x.c:3:6: warning: implicit declaration of function ‘printf’
printf("%d\n", 42);
^
x.c:3:6: warning: incompatible implicit declaration of built-in function ‘printf’
x.c:3:6: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
and clang:
x.c:3:6: warning: implicitly declaring library function 'printf' with type
'int (const char *, ...)'
printf("%d\n", 42);
^
x.c:3:6: note: include the header <stdio.h> or explicitly provide a declaration
for 'printf'
(Neither does it for every undefined symbol, but it's a start.)
<snip>
--
Ben.
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Standard Headers BartC <bc@freeuk.com> - 2017-02-17 16:34 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-17 08:50 -0800
Re: Standard Headers luser droog <luser.droog@gmail.com> - 2017-02-17 09:08 -0800
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-17 20:31 +0000
Re: Standard Headers GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-17 18:09 +0100
Re: Standard Headers "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2017-02-17 09:18 -0800
Re: Standard Headers Keith Thompson <kst-u@mib.org> - 2017-02-17 09:26 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 17:53 +0000
Re: Standard Headers me <crisdunbar@gmail.com> - 2017-02-17 10:23 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 18:45 +0000
Re: Standard Headers GOTHIER Nathan <nathan.gothier@gmail.com> - 2017-02-17 19:54 +0100
Re: Standard Headers Keith Thompson <kst-u@mib.org> - 2017-02-17 12:27 -0800
Re: Standard Headers jameskuyper@verizon.net - 2017-02-17 11:38 -0800
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-17 20:49 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-17 13:29 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-17 22:13 +0000
Re: Standard Headers Nick Bowler <nbowler@draconx.ca> - 2017-02-17 22:28 +0000
Re: Standard Headers Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-02-18 02:48 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-18 10:26 -0800
Re: Standard Headers bart4858@gmail.com - 2017-02-18 11:08 -0800
Re: Standard Headers supercat@casperkitty.com - 2017-02-18 11:45 -0800
Re: Standard Headers Tim Rentsch <txr@alumni.caltech.edu> - 2017-02-19 13:45 -0800
Re: Standard Headers BartC <bc@freeuk.com> - 2017-02-19 22:39 +0000
Re: Standard Headers supercat@casperkitty.com - 2017-02-19 16:00 -0800
csiph-web