Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!news.glorb.com!postnews.google.com!news2.google.com!Xl.tags.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local2.nntp.dca.giganews.com!nntp.earthlink.com!news.earthlink.com.POSTED!not-for-mail |
|---|---|
| NNTP-Posting-Date | Sun, 15 May 2011 21:45:04 -0500 |
| Message-ID | <4DD08FAE.15B3@mindspring.com> (permalink) |
| Date | Sun, 15 May 2011 22:45:02 -0400 |
| From | pete <pfiland@mindspring.com> |
| Reply-To | pfiland@mindspring.com |
| Organization | PF |
| X-Mailer | Mozilla 3.04Gold (WinNT; I) |
| MIME-Version | 1.0 |
| Newsgroups | comp.lang.c |
| Subject | Re: I need help |
| References | <45f62c12-a439-42b7-be27-bab7c954e209@glegroupsg2000goo.googlegroups.com> <iqmhmk$5mt$1@news.m-online.net> <93bdoaFlpiU2@mid.individual.net> |
| Content-Type | text/plain; charset=us-ascii |
| Content-Transfer-Encoding | 7bit |
| Lines | 24 |
| X-Usenet-Provider | http://www.giganews.com |
| NNTP-Posting-Host | 4.154.220.76 |
| X-Trace | sv3-RGoW0hzmwsRMyoVtOeguXGpEbgLNXYw5pF7agffjpNkuP8HAVUQ4lGEFBIjqdwPJqhaHdY+C9qaXvXl!Erl0JN2eWSWACtWyBgAIRhlRmb62wii4vMuwyv+qk4XhiZCPaIS9kmyfpGxByB1kr+Ck/97nQbg6!H/mJ97YK3Q== |
| X-Abuse-and-DMCA-Info | Please be sure to forward a copy of ALL headers |
| X-Abuse-and-DMCA-Info | Otherwise we will be unable to process your complaint properly |
| X-Postfilter | 1.3.40 |
| X-Original-Bytes | 1782 |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.c:4050 |
Show key headers only | View raw
Ian Collins wrote: > > On 05/15/11 06:29 AM, Heinrich Wolf wrote: > > > > or with a macro: > > > > #define STRNCAT(a, b) strncat(a, b, sizeof(a) - strlen(a) - 1) > > char string[10] = "NEW"; > > STRNCAT(string, "Jersey"); > > That macro would go horribly (and silently) wrong if > > a) 'a' wasn't a fixed sized array, or > b) it was, but the definition wasn't visible > when the macro was expanded. If (a) was a fixed sized array, but the definition wasn't visible when the macro was expanded, then (a) would be an incomplete type and (sizeof a) would cause the generation of a diagnostic message, rather than go silently wrong. -- pete
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: I need help janus <emekamicro@gmail.com> - 2011-05-14 11:15 -0700
Re: I need help "Heinrich Wolf" <invalid@invalid.invalid> - 2011-05-14 20:29 +0200
Re: I need help Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-15 13:03 +0300
Re: I need help "Heinrich Wolf" <invalid@invalid.invalid> - 2011-05-15 13:18 +0200
Re: I need help Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-16 04:31 +0300
Re: I need help Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-15 08:13 -0400
Re: I need help "Heinrich Wolf" <invalid@invalid.invalid> - 2011-05-15 14:30 +0200
Re: I need help Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-15 08:45 -0400
Re: I need help Phil Carmody <thefatphil_demunged@yahoo.co.uk> - 2011-05-16 04:34 +0300
Re: I need help Ian Collins <ian-news@hotmail.com> - 2011-05-16 13:42 +1200
Re: I need help Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-05-16 03:28 +0100
Re: I need help pete <pfiland@mindspring.com> - 2011-05-15 22:45 -0400
Re: I need help Ian Collins <ian-news@hotmail.com> - 2011-05-16 14:50 +1200
Re: I need help "Heinrich Wolf" <invalid@invalid.invalid> - 2011-05-16 12:26 +0200
Re: I need help Keith Thompson <kst-u@mib.org> - 2011-05-14 11:33 -0700
Re: I need help Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-05-15 07:58 -0400
csiph-web