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


Groups > comp.lang.c > #63743

Re: recalloc

From Keith Thompson <kst-u@mib.org>
Newsgroups comp.lang.c
Subject Re: recalloc
Date 2015-06-21 13:00 -0700
Organization None to speak of
Message-ID <lna8vsg7ca.fsf@nuthaus.mib.org> (permalink)
References <mm5lnh$tna$1@dont-email.me> <mm5mrf$he$1@dont-email.me> <mm5okt$51n$1@dont-email.me> <87ioahla3c.fsf@bsb.me.uk> <mm61ua$1dl$1@dont-email.me>

Show all headers | View raw


jacobnavia <jacob@jacob.remcomp.fr> writes:
[...]
> ANSIC is a symbol that you define by calling the compiler with the ANSIC 
> flag. That will limit the compiler to the strict C99 standard. No 
> extensions are allowed, no overloaded operators, no windows, no nothing.
>
> It is designed for people that want strict compliance with the standard 
> code.

Others have mentioned that ANSIC is not in the implementation
reserved namespace.

I was about to say that it's redundant given the existence of
__STDC__ and __STDC_VERSION__, but if I understand your description
correctly it isn't.  A fully standard conforming compiler can have
extensions; ANSIC apparently disables them, making it easier to
make sure you're writing portable code.  I like the idea.

But I suggest that the name ANSIC is potentially confusing.  ANSI has
not issued a C standard of its own since 1989.  Instead, ANSI has
officially adopted each edition of the ISO C standard after it was
published (including the 1990 ISO C standard that superseded the
1989 ANSI C standard).  Strictly speaking, the standard currently
recognized by ANSI is ISO C 2011.  But for historical reasons, a lot
of people still use the term "ANSI C" to refer to the version of the
language defined by the 1989 ANSI and 1990 ISO standard documents.
And gcc's "-ansi" option still refers to the older standard; it's
equivalent to "-std=c89" or "-std=c90".  (jacob, I presume you know
all this; I'm just being thorough.)

Since your ANSIC symbol specifies conformance to the C99 standard
with no extensions, I suggest calling it something like __C99_ONLY__,
or perhaps __STRICT_C99__.  (The latter *might* be confused with
"strict conformance", which is a different concept.)

-- 
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
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"

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


Thread

recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-21 08:32 +0200
  Re: recalloc luser droog <luser.droog@gmail.com> - 2015-06-20 23:43 -0700
    Re: recalloc Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-21 10:00 +0100
      Re: recalloc luser droog <luser.droog@gmail.com> - 2015-06-21 09:57 -0700
  Re: recalloc Richard Heathfield <rjh@cpax.org.uk> - 2015-06-21 07:51 +0100
    Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-21 09:22 +0200
      Re: recalloc Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-21 09:49 +0100
        Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-21 12:00 +0200
          Re: recalloc Ben Bacarisse <ben.usenet@bsb.me.uk> - 2015-06-21 12:46 +0100
          Re: recalloc James Kuyper <jameskuyper@verizon.net> - 2015-06-21 12:25 -0400
            Re: recalloc David Kleinecke <dkleinecke@gmail.com> - 2015-06-22 08:27 -0700
          Re: recalloc James Kuyper <jameskuyper@verizon.net> - 2015-06-21 12:30 -0400
          Re: recalloc Keith Thompson <kst-u@mib.org> - 2015-06-21 13:00 -0700
    Re: recalloc Keith Thompson <kst-u@mib.org> - 2015-06-21 12:44 -0700
  Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-21 10:30 +0200
  Re: recalloc Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-21 10:14 -0700
    Re: recalloc Richard Heathfield <rjh@cpax.org.uk> - 2015-06-21 19:28 +0100
    Re: recalloc Bartc <bc@freeuk.com> - 2015-06-21 20:10 +0100
      Re: recalloc Keith Thompson <kst-u@mib.org> - 2015-06-21 12:46 -0700
      Re: recalloc Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-21 13:41 -0700
        Re: recalloc Richard Heathfield <rjh@cpax.org.uk> - 2015-06-22 00:02 +0100
    Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-06-21 22:59 +0200
      Re: recalloc Malcolm McLean <malcolm.mclean5@btinternet.com> - 2015-06-21 14:18 -0700
  Re: recalloc Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-11 04:50 -0700
    Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-07-11 16:18 +0200
      Re: recalloc Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-11 13:51 -0700
        Re: recalloc jacobnavia <jacob@jacob.remcomp.fr> - 2015-07-12 15:51 +0200
          Re: recalloc Tim Rentsch <txr@alumni.caltech.edu> - 2015-07-15 03:57 -0700

csiph-web