Sync usage with man page.
[netbsd-mini2440.git] / gnu / dist / gcc4 / gcc / config / sh / sh-c.c
blob7b9ec1c1e4ddda7c8a726fa158e4830d9bdca492
1 /* Pragma handling for GCC for Renesas / SuperH SH.
2 Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
3 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
4 Contributed by Joern Rennecke <joern.rennecke@st.com>.
6 This file is part of GCC.
8 GCC is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2, or (at your option)
11 any later version.
13 GCC is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING. If not, write to
20 the Free Software Foundation, 51 Franklin Street, Fifth Floor,
21 Boston, MA 02110-1301, USA. */
23 #include "config.h"
24 #include "system.h"
25 #include "coretypes.h"
26 #include "tm.h"
27 #include "tree.h"
28 #include "tm_p.h"
30 /* Handle machine specific pragmas to be semi-compatible with Renesas
31 compiler. */
33 /* Add ATTR to the attributes of the current function. If there is no
34 such function, save it to be added to the attributes of the next
35 function. */
36 static void
37 sh_add_function_attribute (const char *attr)
39 tree id = get_identifier (attr);
41 if (current_function_decl)
42 decl_attributes (&current_function_decl,
43 tree_cons (id, NULL_TREE, NULL_TREE), 0);
44 else
46 *sh_deferred_function_attributes_tail
47 = tree_cons (id, NULL_TREE, *sh_deferred_function_attributes_tail);
48 sh_deferred_function_attributes_tail
49 = &TREE_CHAIN (*sh_deferred_function_attributes_tail);
53 void
54 sh_pr_interrupt (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
56 sh_add_function_attribute ("interrupt_handler");
59 void
60 sh_pr_trapa (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
62 sh_add_function_attribute ("trapa_handler");
65 void
66 sh_pr_nosave_low_regs (struct cpp_reader *pfile ATTRIBUTE_UNUSED)
68 sh_add_function_attribute ("nosave_low_regs");