This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Error message when using ASM_DECLARE_FUNCTION_NAME macr o
- From: "Vincent R." <forumer at smartmobili dot com>
- To: <gcc at gcc dot gnu dot org>
- Date: Wed, 15 Apr 2009 16:20:56 +0200
- Subject: Error message when using ASM_DECLARE_FUNCTION_NAME macr o
Hi,
Sorry to cross-post but I don't have any answer on gcc-help.
When implementing seh for arm(arm-wince-pe) we have a weird assembler
message when
declaring ASM_DECLARE_FUNCTION_NAME. This macro calls the
arm_seh_header_function and
if we are trying to directly access a new field (has_seh) from cfun struct
we
get an assembler error message.
However if we use a temporary variable it seems to work.
Note that we are using gcc 4.4 revision 144974, is it a known bug ?
cc/gcc/config/arm/wince-pe.h
--
#undef ASM_DECLARE_FUNCTION_NAME
#define ASM_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL) \
do \
{ \
arm_seh_header_function (STREAM, NAME, DECL); \
ARM_PE_DECLARE_FUNCTION_NAME(STREAM, NAME, DECL); \
} \
while (0)
arm.c:
-------
//
// IF WE ACCESS DIRCTLY cfun->has_seh we get assembler error .rdata ...
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
if (cfun->has_seh)
{
...
}
}
//
// IF WE USE temp. variable to store cfun->has_seh it WORKS
//
void
arm_seh_header_function (FILE *fp, char *name, tree decl)
{
int has_seh = cfun->has_seh;
if (has_seh)
{
...
}
}