Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c.moderated > #478
| From | James Kuyper <jameskuyper@verizon.net> |
|---|---|
| Newsgroups | comp.lang.c.moderated |
| Subject | Re: Why sizeof(main) = 1? |
| Date | 2013-09-12 11:29 -0500 |
| Organization | A noiseless patient Spider |
| Message-ID | <clcm-20130912-0002@plethora.net> (permalink) |
| References | <clcm-20130104-0002@plethora.net> <clcm-20130902-0002@plethora.net> <clcm-20130906-0003@plethora.net> <clcm-20130911-0004@plethora.net> |
On 09/11/2013 06:27 PM, Robert Wessel wrote: > On Fri, 6 Sep 2013 23:25:44 -0500 (CDT), Keith Thompson > <kst-u@mib.org> wrote: ... >> if (main) yadda; >> >> is well defined but not useful, since `main`, after conversion, >> can never be a null pointer. > > > Is that actually true? Certainly any valid data-type object cannot > have an address of zero/NULL, but is that true of function objects? "a null pointer ... is guaranteed to compare unequal to a pointer to any object or function." (6.3.2.3p3) "Two pointers compare equal if ... both are null pointers." (6.5.9p6) If a pointer to main were a null pointer, those two requirements would be in conflict. -- James Kuyper -- comp.lang.c.moderated - moderation address: clcm@plethora.net -- you must have an appropriate newsgroups line in your header for your mail to be seen, or the newsgroup name in square brackets in the subject line. Sorry.
Back to comp.lang.c.moderated | Previous | Next — Previous in thread | Next in thread | Find similar
Why sizeof(main) = 1? Myth__Buster <raghavanil4m@gmail.com> - 2013-01-04 18:14 -0600
Re: Why sizeof(main) = 1? Barry Schwarz <schwarzb@dqel.com> - 2013-02-26 10:51 -0600
Re: Why sizeof(main) = 1? Keith Thompson <kst-u@mib.org> - 2013-03-11 18:25 -0500
Re: Why sizeof(main) = 1? Jasen Betts <jasen@xnet.co.nz> - 2013-02-26 10:51 -0600
Re: Why sizeof(main) = 1? gordonb.k8xjg@burditt.org (Gordon Burditt) - 2013-02-26 10:51 -0600
Re: Why sizeof(main) = 1? <kzelechowski@e3tech.local> - 2013-09-02 04:07 -0500
Re: Why sizeof(main) = 1? James Kuyper <jameskuyper@verizon.net> - 2013-09-06 23:25 -0500
Re: Why sizeof(main) = 1? Keith Thompson <kst-u@mib.org> - 2013-09-11 17:26 -0500
Re: Why sizeof(main) = 1? James Kuyper <jameskuyper@verizon.net> - 2013-09-12 11:29 -0500
Re: Why sizeof(main) = 1? Keith Thompson <kst-u@mib.org> - 2013-09-06 23:25 -0500
Re: Why sizeof(main) = 1? Robert Wessel <robertwessel2@yahoo.com> - 2013-09-11 17:27 -0500
Re: Why sizeof(main) = 1? James Kuyper <jameskuyper@verizon.net> - 2013-09-12 11:29 -0500
Re: Why sizeof(main) = 1? Keith Thompson <kst-u@mib.org> - 2013-09-12 11:30 -0500
Re: Why sizeof(main) = 1? Ken Brody <kenbrody@spamcop.net> - 2013-09-06 23:25 -0500
csiph-web