git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Andreas Ericsson <ae@op5.se>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Jonathan Nieder <jrnieder@gmail.com>,
	Git Mailing List <git@vger.kernel.org>,
	David Michael Barr <david.barr@cordelta.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Michael J Gruber <git@drmicha.warpmail.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 1/6] Add memory pool library
Date: Mon, 14 Jun 2010 16:44:15 +0200	[thread overview]
Message-ID: <4C16403F.4040400@op5.se> (raw)
In-Reply-To: <AANLkTimtya1Ph5YjlFVAVpE2p4XOHvuaFAmsS4C0J5LH@mail.gmail.com>

On 06/14/2010 04:25 PM, Ramkumar Ramachandra wrote:
> Hi Jonathan,
> 
> Jonathan Nieder wrote:
>>   #ifdef __GNUC__
>>   #define MAYBE_UNUSED __attribute__((__unused__))
>>   #else
>>   #define MAYBE_UNUSED
>>   #endif
> 
> You'd suggested this earlier, but I was looking more for something
> that we could use to mark some specific functions as unused instead of
> marking everything as unused in the generation macro. Anyway, I have a
> patch ready, and svn-fe compiles fine with -Wall -Werror.
> 
>> Could that work here?
>>
>> The “unused” attribute was added in gcc 2.7.
> 
> Junio? Is this a good solution, or should we think of something else?
> What about other compilers?
> 

__attribute__((stuff)) is gcc-specific. It's usually macro'd away with
#ifndef __GNUC__
#define __attribute__(x)
#endif
which is why it requires double parantheses. gcc warns for but doesn't
fail on unknown attributes, so it should be safe to use this with
gcc older than 2.7 as well. Or you make it conditional to __GNUC__
being >= 2 and __GNUC_MINOR__ being >= 7.

-- 
Andreas Ericsson                   andreas.ericsson@op5.se
OP5 AB                             www.op5.se
Tel: +46 8-230225                  Fax: +46 8-230231

Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.

  reply	other threads:[~2010-06-14 14:44 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10 13:09 [PATCH 0/6] Another attempt to get the SVN exporter merged Ramkumar Ramachandra
2010-06-10 13:09 ` [PATCH 1/6] Add memory pool library Ramkumar Ramachandra
2010-06-12  6:42   ` Jonathan Nieder
2010-06-14 14:25     ` Ramkumar Ramachandra
2010-06-14 14:44       ` Andreas Ericsson [this message]
2010-06-10 13:09 ` [PATCH 2/6] Add cpp macro implementation of treaps Ramkumar Ramachandra
2010-06-10 13:09 ` [PATCH 3/6] Add library for string-specific memory pool Ramkumar Ramachandra
2010-06-11 19:33   ` Junio C Hamano
2010-06-14  9:26     ` Ramkumar Ramachandra
2010-06-14 13:36       ` Junio C Hamano
2010-06-14 13:49         ` Ramkumar Ramachandra
2010-06-14 14:45           ` David Michael Barr
2010-06-10 13:09 ` [PATCH 4/6] Add stream helper library Ramkumar Ramachandra
2010-06-10 13:09 ` [PATCH 5/6] Add infrastructure to write revisions in fast-export format Ramkumar Ramachandra
2010-06-10 13:09 ` [PATCH 6/6] Add SVN dump parser Ramkumar Ramachandra
2010-06-10 15:24   ` Ramkumar Ramachandra
     [not found] ` <AANLkTin3iQK7YHGgjxlAjtchu3ZpntjQHK7LkfxxJj6q@mail.gmail.com>
2010-06-10 13:22   ` [PATCH 0/6] Another attempt to get the SVN exporter merged Ramkumar Ramachandra
2010-06-12  6:26 ` Jonathan Nieder
2010-06-14 14:41   ` Ramkumar Ramachandra
  -- strict thread matches above, loose matches on Subject: below --
2010-06-04 13:41 [PATCH 0/6] Merge David's SVN exporter Ramkumar Ramachandra
2010-06-04 13:41 ` [PATCH 1/6] Add memory pool library Ramkumar Ramachandra
2010-06-04 18:29   ` Jonathan Nieder
2010-06-07 13:28     ` Ramkumar Ramachandra
2010-06-07 14:00       ` Erik Faye-Lund
2010-06-07 14:35         ` Ramkumar Ramachandra
2010-06-04 13:26 [PATCH 0/6] Merge David's SVN exporter into git.git Ramkumar Ramachandra
2010-06-04 13:26 ` [PATCH 1/6] Add memory pool library Ramkumar Ramachandra

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=4C16403F.4040400@op5.se \
    --to=ae@op5.se \
    --cc=artagnon@gmail.com \
    --cc=david.barr@cordelta.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jrnieder@gmail.com \
    --cc=srabbelier@gmail.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.
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).