edbrowse-dev - development list for edbrowse
 help / color / mirror / Atom feed
From: Chris Brannon <chris@the-brannons.com>
To: Edbrowse-dev@lists.the-brannons.com
Subject: Re: [Edbrowse-dev] Microsoft C
Date: Sat, 26 Sep 2015 08:36:06 -0700	[thread overview]
Message-ID: <87twqhjiqh.fsf@mushroom.localdomain> (raw)
In-Reply-To: <20150826111122.eklhad@comcast.net> (Karl Dahlke's message of "Sat, 26 Sep 2015 11:11:22 -0400")

Karl Dahlke <eklhad@comcast.net> writes:

> gcc allows us to define variables anywhere in a block, but Studio C does not.
> In the interest of a possible windows port, I request all developers
> keep variable definitions at the top of each function or block,
> as per K&R.

It's not gcc.  This was introduced with the C99 standard.  I wonder if
Visual Studio can be told that code is C99?
If not, oh well.

On the other hand, gcc allows mixed declarations and code regardless of
the standard.  If you build with -Wall -pedantic and aren't compiling
C99 or C++, it'll complain about mixed declarations and code, but it
will happily compile it.

-- Chris

      reply	other threads:[~2015-09-26 15:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-26 15:11 Karl Dahlke
2015-09-26 15:36 ` Chris Brannon [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87twqhjiqh.fsf@mushroom.localdomain \
    --to=chris@the-brannons.com \
    --cc=Edbrowse-dev@lists.the-brannons.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).