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


Groups > comp.lang.c > #2753

Re: quest for cross-platform static assert

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: quest for cross-platform static assert
Date 2011-04-21 11:42 -0700
Organization None to speak of
Message-ID <lnzknj30ph.fsf@nuthaus.mib.org> (permalink)
References <4dada675$0$7171$426a74cc@news.free.fr> <281TH4JtBcrNFAC1@phaedsys.demon.co.uk> <4dadc7c3$0$26043$426a74cc@news.free.fr> <39pDHfBfJ$rNFAyH@phaedsys.demon.co.uk>

Show all headers | View raw


Chris H <chris@phaedsys.org> writes:
> In message <4dadc7c3$0$26043$426a74cc@news.free.fr>, Francois Grieu
> <fgrieu@gmail.com> writes
>>On 19/04/2011 19:03, Chris H wrote:
>>> In message<4dada675$0$7171$426a74cc@news.free.fr>, Francois Grieu
>>> <fgrieu@gmail.com>  writes
>>>> Under C89/90/99, there is no static assert allowing to check a
>>>> constant expression at compile time.
>>>
>>> Snip
>>>
>>>> Can this be improved upon, towards the grail of working almost everywhere
>>>> without special-casing for this or that environment?
>>>
>>> It is not a holy grail. Most don't care about portability. Most of those
>>> who do only care for a very small sub set of environments.
>>
>>Most pursue other grails than me.
>>
> SO why do you want to be able to run on a PIC, PowerPC, Alpha, MIPS,
> ARM, 8051 and x86?

Why not?

If there's some advantage to writing code that will only work
on a subset of implementations, then by all means do so.  But if
it's just as easy to write code that will work on any conforming
C implementation, why not do it?  It means, among other things,
that the code will continue to work on future C implementations.

-- 
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 | Next in thread | Find similar | Unroll thread


Thread

quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-19 17:13 +0200
  Re: quest for cross-platform static assert Chris H <chris@phaedsys.org> - 2011-04-19 18:03 +0100
    Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-19 19:35 +0200
      Re: quest for cross-platform static assert Chris H <chris@phaedsys.org> - 2011-04-21 10:01 +0100
        Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-21 19:25 +0200
          Re: quest for cross-platform static assert Chris H <chris@phaedsys.org> - 2011-04-22 09:03 +0100
            Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-22 13:45 +0200
        Re: quest for cross-platform static assert Keith Thompson <kst-u@mib.org> - 2011-04-21 11:42 -0700
          Re: quest for cross-platform static assert Seebs <usenet-nospam@seebs.net> - 2011-04-23 00:52 +0000
  Re: quest for cross-platform static assert "christian.bau" <christian.bau@cbau.wanadoo.co.uk> - 2011-04-19 10:13 -0700
    Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-19 19:32 +0200
  Re: quest for cross-platform static assert ImpalerCore <jadill33@gmail.com> - 2011-04-20 06:42 -0700
  Re: quest for cross-platform static assert Tim Rentsch <txr@alumni.caltech.edu> - 2011-04-20 11:04 -0700
    Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-21 10:34 +0200
      Re: quest for cross-platform static assert Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-04-21 08:13 -0400
        Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-21 19:10 +0200
        Re: quest for cross-platform static assert William Ahern <william@wilbur.25thandClement.com> - 2011-04-21 10:28 -0700
        Re: quest for cross-platform static assert Ben Bacarisse <ben.usenet@bsb.me.uk> - 2011-04-21 18:49 +0100
          Re: quest for cross-platform static assert Francois Grieu <fgrieu@gmail.com> - 2011-04-22 14:10 +0200
      Re: quest for cross-platform static assert  [a new, better? one] Francois Grieu <fgrieu@gmail.com> - 2011-04-22 16:04 +0200
      Re: quest for cross-platform static assert Tim Rentsch <txr@alumni.caltech.edu> - 2011-04-23 13:37 -0700

csiph-web