This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Add support for the Win32 hook prologue (try 5)



Am 23.09.2009 um 17:18 schrieb Richard Henderson:
Ah, this is because for some reason you've configured the attribute to apply to the function's type, rather than the function itself. This is a mistake, I think, since there's nothing about the attribute that changes its calling conventions.

Try switching the attribute table to

{ "ms_hook_thingy", 0, 0, true, false, false, new_function }
I tried this, and decl_function_context works now without triggering an internal error. However, gcc doesn't accept the attribute:

{ "ms_hook_prologue", 0, 0, true, false, false, ix86_handle_abi_attribute },

My test file
int __attribute__((__ms_hook_prologue__)) testfunc()
{	
	return 0;
}

test.c:2:1: warning: ‘__ms_hook_prologue__’ attribute only applies to functions

Huh? As far as I understand C I am applying the attribute to a function in that code. I feel kinda stupid here. What's wrong this time?

I found the declaration of struct attribute_spec, but the comments didn't really explain to me why the function isn't a function.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]