From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Nick Roberts <nickrob@snap.net.nz>
Cc: Glenn Morris <rgm@gnu.org>,
Michael Albinus <michael.albinus@gmx.de>,
emacs-devel@gnu.org
Subject: Re: warning compiling dbusbind.c
Date: Thu, 24 Jan 2008 21:19:29 -0500 [thread overview]
Message-ID: <jwvwspyirb6.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <18329.7503.159519.468559@kahikatea.snap.net.nz> (Nick Roberts's message of "Fri, 25 Jan 2008 12:20:47 +1300")
>> > Yuck. I must prefer living with the warning (which is just that:
>> > a warning. We already have several similar ones).
>>
>> I menioned this because it is the only warning of any kind I get when
>> compiling the Emacs C code.
> Indeed, in GDB all files are compiled with the -Werror option, presumably
> because GCC folks are more knowledgeable about what is undesirable than the
> average developer.
But uglifying the code and making it less maintainable just to get rid
of a minor warning is not good software engineering practices.
I'd much rather introduce a dummy macro like
#define DEFEAT_WARNING(x) ((EMACS_INT)(x))
or even
#define DEFEAT_WARNING(x) ((((EMACS_INT)(x))+1)-1)
then introduce the "#if BITS_PER_EMACS_INT >= 32" that dispatches to two
different macros, where the reason why it's correct is not nearly
as obvious.
Stefan
next prev parent reply other threads:[~2008-01-25 2:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 19:18 warning compiling dbusbind.c Glenn Morris
2008-01-24 20:05 ` Michael Albinus
2008-01-24 21:25 ` Stefan Monnier
2008-01-24 22:33 ` Glenn Morris
2008-01-24 23:20 ` Nick Roberts
2008-01-25 2:19 ` Stefan Monnier [this message]
2008-01-25 19:04 ` Michael Albinus
2008-01-25 22:42 ` Glenn Morris
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=jwvwspyirb6.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=emacs-devel@gnu.org \
--cc=michael.albinus@gmx.de \
--cc=nickrob@snap.net.nz \
--cc=rgm@gnu.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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.