public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Gerst <bgerst@didntduck.org>
To: Timmy Douglas <timmy+lkml@cc.gatech.edu>
Cc: linux-kernel@vger.kernel.org
Subject: Re: macro in linux/compiler.h pollutes gcc __attribute__ namespace
Date: Wed, 04 May 2005 13:46:46 -0400	[thread overview]
Message-ID: <42790A86.9070002@didntduck.org> (raw)
In-Reply-To: <87vf5y99o3.fsf@mail.gatech.edu>

Timmy Douglas wrote:
> (I'm not subscribed so please CC me replies that you want me to reply
> to.)
> 
> Recently I've found a problem with emacs where gcc optimizes a
> function to be inline where it shouldn't be. The emacs developers use
> a macro like this:
> 
> #define NO_INLINE __attribute__((noinline))
> 
> that would normally work fine but when we compile the file with
> NO_INLINE, the -E output looks like:
> 
> static void __attribute__(())
> x_error_quitter (display, error)
>      Display *display;
>      XErrorEvent *error;
> {
>   char buf[256], buf1[356];
> 
> ...etc
> 
> 
> I've realized that this file includes linux/compiler.h which does:
> 
> 
>    139
>    140  #ifndef noinline
>    141  #define noinline
>    142  #endif
>    143
> 
> which causes __atribute__((noinline)) to change into
> __attribute__(()). I'm not sure how linux developers keep a function
> from getting inlined, but I'm hoping someone will consider removing or
> changing this macro.

The right question to be asking is why is emacs including kernel headers?

--
				Brian Gerst

  reply	other threads:[~2005-05-04 17:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-04 17:35 macro in linux/compiler.h pollutes gcc __attribute__ namespace Timmy Douglas
2005-05-04 17:46 ` Brian Gerst [this message]
2005-05-04 18:10   ` Timmy Douglas
2005-05-04 20:55     ` Kyle Moffett
2005-05-05  2:08       ` Timmy Douglas

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=42790A86.9070002@didntduck.org \
    --to=bgerst@didntduck.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=timmy+lkml@cc.gatech.edu \
    /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