Re: [PATCH] Fix vmi time header bug

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: Andi Kleen <ak@...>, <zach@...>, <linux-kernel@...>
Date: Tuesday, March 13, 2007 - 1:53 pm

On Tue, 13 Mar 2007, Andrew Morton wrote:

Well, I guess sparse could do it, but the fact is, this is just a gcc bug. 
It would be much better if *gcc* just checked the function attributes it 
cared about. Anybody want to send a bug-report to the gcc lists?

Here's a trivial test-case.

	#define section(x) __attribute__((__section__(x)))

	extern int section(".text.one") test_function(int);

	int section(".text.two") test_function(int arg)
	{
		return arg+1;
	}

and the bug is that gcc doesn't warn about the section mismatch, and still 
seems to care.

(Now, if gcc doesn't care, missing the section from the declaration could 
be considered ok. But having explicit but *different* section declarations 
can clearly not be ok, and it seems that gcc sometimes *does* require 
sections to match, so it probably should always require them to match 
exactly).

We could make sparse care, but right now sparse ignores the section 
attribute *entirely*.

		Linus
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Fix vmi time header bug, Zachary Amsden, (Mon Mar 12, 6:58 pm)
Re: [PATCH] Fix vmi time header bug, Andrew Morton, (Tue Mar 13, 2:31 am)
Re: [PATCH] Fix vmi time header bug, Zachary Amsden, (Tue Mar 13, 2:46 am)
Re: [PATCH] Fix vmi time header bug, Andi Kleen, (Tue Mar 13, 8:45 am)
Re: [PATCH] Fix vmi time header bug, Andrew Morton, (Tue Mar 13, 9:59 am)
Re: [PATCH] Fix vmi time header bug, Linus Torvalds, (Tue Mar 13, 1:53 pm)
Re: [PATCH] Fix vmi time header bug, Jeremy Fitzhardinge, (Tue Mar 13, 1:32 pm)
Re: [PATCH] Fix vmi time header bug, Zachary Amsden, (Tue Mar 13, 2:21 am)