mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jeff Chua <jchua@fedex.com>
To: Andrew Morton <akpm@osdl.org>
Cc: Jeff Chua <jeffchua@silk.corp.fedex.com>,
	torvalds@osdl.org, Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] warning: `__attribute_used__' redefined
Date: Tue, 10 Feb 2004 21:59:15 +0800 (SGT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0402102150150.17289@silk.corp.fedex.com> (raw)
In-Reply-To: <20040209225336.1f9bc8a8.akpm@osdl.org>

On Mon, 9 Feb 2004, Andrew Morton wrote:

> It is more likely that we need to extend the __KERNEL__ coverage somewhere.
>
> Can you please do a `gcc -H' of that application and show us the inclusion
> route by which it is hitting compiler.h?

Andrew,

Here's the sample "sig.c". Just compile with "cc sig.c"



#include <signal.h>	/* signal */
#include <stdio.h>	/* printf */

void action(int signum);

int main(int argc, char *argv[])
{
	int i;
	for(i = 1; i < 31; i++) {
		if(i == 9 || i == 19)
			continue;

		signal(i, action);
	}
}

void action(int signum)
{
	printf("%d\n", signum);
}




Here's output of "gcc -H sig.c" gcc 2.95.3  glibc 2.2.5  linux 2.6.3-rc2


/usr/include/signal.h
 /usr/include/features.h
  /usr/include/sys/cdefs.h
  /usr/include/gnu/stubs.h
 /usr/include/bits/sigset.h
 /usr/include/bits/types.h
  /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
  /usr/include/bits/pthreadtypes.h
   /usr/include/bits/sched.h
 /usr/include/bits/signum.h
 /usr/include/time.h
 /usr/include/bits/siginfo.h
  /usr/include/bits/wordsize.h
 /usr/include/bits/sigaction.h
 /usr/include/bits/sigcontext.h
  /usr/include/asm/sigcontext.h
   /usr/include/linux/compiler.h
    /usr/include/linux/compiler-gcc2.h
     /usr/include/linux/compiler-gcc.h
In file included from /usr/include/linux/compiler.h:18,
                 from /usr/include/asm/sigcontext.h:4,
                 from /usr/include/bits/sigcontext.h:28,
                 from /usr/include/signal.h:307,
                 from sig.c:1:
/usr/include/linux/compiler-gcc2.h:21: warning: `__attribute_used__' redefined
/usr/include/sys/cdefs.h:170: warning: this is the location of the previous definition
 /usr/include/bits/sigstack.h
 /usr/include/bits/sigthread.h
/usr/include/stdio.h
 /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
 /usr/include/libio.h
  /usr/include/_G_config.h
   /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
   /usr/include/wchar.h
    /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
    /usr/include/bits/wchar.h
   /usr/include/gconv.h
    /usr/include/wchar.h
     /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
    /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stddef.h
  /usr/lib/gcc-lib/i586-pc-linux-gnu/2.95.3/include/stdarg.h
 /usr/include/bits/stdio_lim.h


Thanks,
Jeff



  reply	other threads:[~2004-02-10 14:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-10  6:39 Jeff Chua
2004-02-10  6:53 ` Andrew Morton
2004-02-10 13:59   ` Jeff Chua [this message]
2004-02-10 16:25     ` Andrew Morton
2004-02-10 16:31       ` Linus Torvalds
2004-02-10 17:10         ` Daniel Jacobowitz
2004-02-10 17:18           ` Linus Torvalds
2004-02-10 17:28           ` Valdis.Kletnieks
2004-02-10 17:37         ` Andrew Morton
2004-02-11 13:07         ` Jeff Chua

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=Pine.LNX.4.58.0402102150150.17289@silk.corp.fedex.com \
    --to=jchua@fedex.com \
    --cc=akpm@osdl.org \
    --cc=jeffchua@silk.corp.fedex.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®