Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c > #9559

Re: "struct hack" with non-character array[1]

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: "struct hack" with non-character array[1]
Date 2011-08-19 09:41 -0700
Organization None to speak of
Message-ID <ln39gx1hh2.fsf@nuthaus.mib.org> (permalink)
References <hbf.20110819eide@bombur.uio.no>

Show all headers | View raw


Hallvard B Furuseth <h.b.furuseth@usit.uio.no> writes:
> I seem to remember the "struct hack" is safer if the fake
> dynamic array has character type.  If that's right, where/why?
> Maybe in C99, since the struct hack is undefined in C89?  Or
> real life implementations, nothing to do with the standard?

I've never heard of that, and I have no reason to believe it.
It's probably either somebody's bad guess, or something that isn't
actually the struct hack, as Eric Sosman speculates.

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"

Back to comp.lang.c | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

"struct hack" with non-character array[1] Hallvard B Furuseth <h.b.furuseth@usit.uio.no> - 2011-08-19 12:28 +0200
  Re: "struct hack" with non-character array[1] Ian Collins <ian-news@hotmail.com> - 2011-08-19 23:15 +1200
    Re: "struct hack" with non-character array[1] Hallvard B Furuseth <h.b.furuseth@usit.uio.no> - 2011-08-19 15:12 +0200
    Re: "struct hack" with non-character array[1] falk@rahul.net (Edward A. Falk) - 2011-08-19 16:41 +0000
  Re: "struct hack" with non-character array[1] Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-08-19 08:01 -0400
  Re: "struct hack" with non-character array[1] James Kuyper <jameskuyper@verizon.net> - 2011-08-19 08:40 -0400
  Re: "struct hack" with non-character array[1] Keith Thompson <kst-u@mib.org> - 2011-08-19 09:41 -0700

csiph-web