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


Groups > comp.lang.c > #139197

Re: Methodologies for C programming

From rbowman <bowman@montana.com>
Newsgroups comp.lang.c
Subject Re: Methodologies for C programming
Date 2018-12-28 20:42 -0700
Message-ID <g8o8moFpp47U1@mid.individual.net> (permalink)
References (4 earlier) <23c4af0e-5a02-4285-ac00-0b2f81293725@googlegroups.com> <g8lnbdF8us9U1@mid.individual.net> <lnsgyi9q5y.fsf@kst-u.example.com> <g8mtpeFgu0bU1@mid.individual.net> <lno9959zly.fsf@kst-u.example.com>

Show all headers | View raw


On 12/28/2018 01:15 PM, Keith Thompson wrote:
> `bool` is a keyword in C++, and if you want to be able to compile
> your C code with a C++ compiler, you obviously can't use `bool`
> (or `class`, or `public`, or ...) as an identifier.  But there's
> rarely a real need to write C++-compatible C code.  No C compiler
> should complain about `int bool;`.  And I'm fairly sure all versions
> of Visual Studio include a C compiler.

I'll have to experiment. It's all 'cl', with the compiler deciding on 
the filename extension unless you use /Tc to treat everything as a C 
file. To quote from the horse's mouth:

"The Visual C++ C compiler is compatible with the ISO C99 standard, but 
not strictly compliant. In most cases, portable C code will compile and 
run as expected. Visual C++ doesn't support most of the changes in ISO 
C11. Certain library functions and POSIX function names are deprecated 
by the Visual C++ compiler. The functions are supported, but the 
preferred names have changed."

It's left to the user to find the non-compliant parts. For various 
painful reasons most of our programmers build with the cl from VS 6.0 
which mostly supports C89. I use the 2005 cl which has some C99 
features. For example it whines about the implicit int. I think that's 
the one that also gets confused about bool. afaik, no version has gotten 
around to _Bool yet.

We still have some K&R style function definitions lurking in the dark 
corners that will probably bite us some day. At least C never went off 
the rails like Python 3 and it still works with a wide variety of tools 
if you are conservative and don't adopt the latest greatest feature.

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


Thread

Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-07 05:15 -0800
  Re: Methodologies for C programming Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-12-07 05:38 -0800
    Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-07 07:57 -0800
      Re: Methodologies for C programming David Brown <david.brown@hesbynett.no> - 2018-12-07 18:05 +0100
  Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-07 08:08 -0800
  Re: Methodologies for C programming William Ahern <william@25thandClement.com> - 2018-12-07 10:08 -0800
    Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-07 10:23 -0800
  Re: Methodologies for C programming Wouter Verhelst <w@uter.be> - 2018-12-07 22:04 +0100
  Re: Methodologies for C programming Ian Collins <ian-news@hotmail.com> - 2018-12-08 10:46 +1300
    Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-08 02:27 -0800
      Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-08 10:35 -0800
        Re: Methodologies for C programming Jorgen Grahn <grahn+nntp@snipabacken.se> - 2018-12-09 08:22 +0000
  Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-09 14:40 -0800
  Re: Methodologies for C programming "Pascal J. Bourguignon" <pjb@informatimago.com> - 2018-12-27 13:17 +0100
    Re: Methodologies for C programming "Rick C. Hodgin" <rick.c.hodgin@gmail.com> - 2018-12-27 08:12 -0500
    Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2018-12-27 07:54 -0800
      Re: Methodologies for C programming Richard Damon <Richard@Damon-Family.org> - 2018-12-27 11:32 -0500
      Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-27 09:22 -0800
  Re: Methodologies for C programming jacobnavia <jacob@jacob.remcomp.fr> - 2018-12-27 19:54 +0100
    Re: Methodologies for C programming Richard Damon <Richard@Damon-Family.org> - 2018-12-27 17:54 -0500
      Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-27 16:24 -0800
        Re: Methodologies for C programming Chad <cdalten@gmail.com> - 2018-12-27 17:57 -0800
        Re: Methodologies for C programming Chad <cdalten@gmail.com> - 2018-12-27 17:58 -0800
          Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-27 21:34 -0700
            Re: Methodologies for C programming Keith Thompson <kst-u@mib.org> - 2018-12-27 21:27 -0800
              Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-28 08:30 -0700
                Re: Methodologies for C programming Keith Thompson <kst-u@mib.org> - 2018-12-28 12:15 -0800
                Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-28 20:42 -0700
                Re: Methodologies for C programming Tim Rentsch <txr@alumni.caltech.edu> - 2018-12-29 09:26 -0800
                Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-29 13:50 -0700
  Re: Methodologies for C programming luser droog <luser.droog@gmail.com> - 2018-12-30 12:39 -0800
    Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-30 14:00 -0800
      Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-30 14:18 -0800
    Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-30 16:48 -0700
      Re: Methodologies for C programming luser droog <luser.droog@gmail.com> - 2018-12-31 00:06 -0800
        Re: Methodologies for C programming fir <profesor.fir@gmail.com> - 2018-12-31 02:34 -0800
        Re: Methodologies for C programming Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-12-31 05:13 -0800
        Re: Methodologies for C programming rbowman <bowman@montana.com> - 2018-12-31 12:44 -0700
      Re: Methodologies for C programming Tim Rentsch <txr@alumni.caltech.edu> - 2019-01-01 16:01 -0800
      Re: Methodologies for C programming Tim Rentsch <txr@alumni.caltech.edu> - 2019-01-01 16:23 -0800
    Re: Methodologies for C programming Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-12-31 05:08 -0800
      Re: Methodologies for C programming Ike Naar <ike@iceland.freeshell.org> - 2018-12-31 17:32 +0000
        Re: Methodologies for C programming Malcolm McLean <malcolm.arthur.mclean@gmail.com> - 2018-12-31 14:13 -0800
  Re: Methodologies for C programming Thiago Adams <thiago.adams@gmail.com> - 2019-01-02 02:48 -0800

csiph-web