mirror of
https://github.com/autc04/Retro68.git
synced 2024-12-26 16:29:28 +00:00
make pascal attribute imply C linkage (fixes #75)
This commit is contained in:
parent
b6bbe4d5a4
commit
7d2fd1bf78
@ -156,7 +156,7 @@
|
||||
builtin_assert ("machine=powerpc"); \
|
||||
builtin_assert ("cpu=m68k"); \
|
||||
builtin_assert ("machine=m68k"); \
|
||||
builtin_define("pascal="); \
|
||||
builtin_define("pascal=__attribute__((__pascal__))"); \
|
||||
builtin_define("__IEEE_BIG_ENDIAN"); \
|
||||
} \
|
||||
while (0)
|
||||
|
@ -1547,6 +1547,9 @@ static const struct attribute_spec rs6000_attribute_table[] =
|
||||
rs6000_handle_struct_attribute, NULL },
|
||||
{ "gcc_struct", 0, 0, false, false, false, false,
|
||||
rs6000_handle_struct_attribute, NULL },
|
||||
{ "pascal", 0, 0, false, true, true, false/*don't be strict about function pointers*/,
|
||||
NULL, NULL },
|
||||
|
||||
#ifdef SUBTARGET_ATTRIBUTE_TABLE
|
||||
SUBTARGET_ATTRIBUTE_TABLE,
|
||||
#endif
|
||||
|
@ -8855,6 +8855,12 @@ grokfndecl (tree ctype,
|
||||
(IDENTIFIER_POINTER (declarator))))))
|
||||
SET_DECL_LANGUAGE (decl, lang_c);
|
||||
|
||||
if (attrlist && lookup_attribute ("pascal", *attrlist))
|
||||
{
|
||||
// paradoxical, but true: Mac pascal function names aren't mangled.
|
||||
SET_DECL_LANGUAGE (decl, lang_c);
|
||||
}
|
||||
|
||||
/* Should probably propagate const out from type to decl I bet (mrs). */
|
||||
if (staticp)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user