git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH 2/2] commit-slab.h: avoid duplicated global static variables
Date: Tue, 09 Aug 2016 10:17:23 -0700	[thread overview]
Message-ID: <xmqqpophc15o.fsf@gitster.mtv.corp.google.com> (raw)
In-Reply-To: <57A9E614.6050601@kdbg.org> (Johannes Sixt's message of "Tue, 9 Aug 2016 16:17:56 +0200")

Johannes Sixt <j6t@kdbg.org> writes:

>   * like function declarations.  I.e., the expansion of
>   *
>   *    define_commit_slab(indegree, int);
>   *
> - * ends in 'static int stat_indegreerealloc;'.  This would otherwise
> + * ends in 'struct indegree;'.  This would otherwise
>   * be a syntax error according (at least) to ISO C.  It's hard to
>   * catch because GCC silently parses it by default.
>   */

I briefly wondered what "otherwise" and "it" in "silently parses it"
refer to; it is having a hanging semicolon after the definition of
the *_peek() function, i.e.

	...
        static int *indegree_peek(...)
        {
		return indegree_at_peek(s, c, 0);
	}
	;

so all is fine.

Needless to say, using "struct slabname;" is indeed a much nicer
solution you found to the original issue.  Thanks.

      parent reply	other threads:[~2016-08-09 17:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-09 14:16 [PATCH 1/2] config.c: avoid duplicated global static variables Johannes Sixt
2016-08-09 14:17 ` [PATCH 2/2] commit-slab.h: " Johannes Sixt
2016-08-09 14:25   ` Johannes Sixt
2016-08-09 17:17   ` Junio C Hamano [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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=xmqqpophc15o.fsf@gitster.mtv.corp.google.com \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).