Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Portable 16 bit binary integer write Date: Mon, 19 Sep 2016 10:54:41 -0700 Organization: None to speak of Lines: 18 Message-ID: References: <50a1e8f4-4fb3-4491-97d0-54768bf28685@googlegroups.com> <0b757bbb-0494-44cb-bd5a-26f117aaa404@googlegroups.com> <2cf666d7-0755-4c70-adad-07dbafc2b2e7@googlegroups.com> <09cb4413-16a6-4b63-89d0-9dafe56562f6@googlegroups.com> <68e53f3a-5fcc-44fc-90c4-bcf8dc3db680@googlegroups.com> <46fcfdac-a18e-4ee4-8f57-33fd9bce02cd@googlegroups.com> <48e74afb-1f97-4c30-aff7-e982c543653f@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="945944de09706c9b4e29b53c9d2efdc2"; logging-data="4122"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+kN1uddzC2Q8A3O0pB7zrJ" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:SKzxWej6qibBtCWKy7D0dYF2/Ow= sha1:+jIt8DMiXabKV6dnrfLyuDiQ9TQ= Xref: csiph.com comp.lang.c:93808 supercat@casperkitty.com writes: [...] > What static assertion could a program use to indicate that it will only > work on implementations where signed overflow will never have any side- > effect other than yielding a value which may behave as though it has non- > deterministic "upper bits"? No such static assertion is possible in unextended standard C. Since you're obviously fascinated with the idea of supporting such assertions, why don't you write up a concrete proposal? (You could post it on your blog.) -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"