Mercurial > hg > CbC > CbC_gcc
comparison gcc/config/v850/v850-c.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
1 /* v850 specific, C compiler specific functions. | 1 /* v850 specific, C compiler specific functions. |
2 Copyright (C) 2000, 2007 Free Software Foundation, Inc. | 2 Copyright (C) 2000, 2001, 2002, 2003, 2005, 2007, 2009 |
3 Free Software Foundation, Inc. | |
3 Contributed by Jeff Law (law@cygnus.com). | 4 Contributed by Jeff Law (law@cygnus.com). |
4 | 5 |
5 This file is part of GCC. | 6 This file is part of GCC. |
6 | 7 |
7 GCC is free software; you can redistribute it and/or modify | 8 GCC is free software; you can redistribute it and/or modify |
112 /* Support for GHS pragmata. */ | 113 /* Support for GHS pragmata. */ |
113 | 114 |
114 void | 115 void |
115 ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) | 116 ghs_pragma_section (cpp_reader * pfile ATTRIBUTE_UNUSED) |
116 { | 117 { |
117 int repeat; | 118 int repeat = 0; |
118 | 119 |
119 /* #pragma ghs section [name = alias [, name = alias [, ...]]] */ | 120 /* #pragma ghs section [name = alias [, name = alias [, ...]]] */ |
120 do | 121 do |
121 { | 122 { |
122 tree x; | 123 tree x; |
123 enum cpp_ttype type; | 124 enum cpp_ttype type; |
125 tree sect_ident; | |
124 const char *sect, *alias; | 126 const char *sect, *alias; |
125 enum GHS_section_kind kind; | 127 enum GHS_section_kind kind; |
126 | 128 |
127 type = pragma_lex (&x); | 129 type = pragma_lex (&x); |
128 | 130 |
129 if (type == CPP_EOF && !repeat) | 131 if (type == CPP_EOF && !repeat) |
130 goto reset; | 132 goto reset; |
131 else if (type == CPP_NAME) | 133 else if (type == CPP_NAME) |
132 sect = IDENTIFIER_POINTER (x); | 134 { |
135 sect_ident = x; | |
136 sect = IDENTIFIER_POINTER (sect_ident); | |
137 } | |
133 else | 138 else |
134 goto bad; | 139 goto bad; |
135 repeat = 0; | 140 repeat = 0; |
136 | 141 |
137 if (pragma_lex (&x) != CPP_EQ) | 142 if (pragma_lex (&x) != CPP_EQ) |
160 allowed! */ | 165 allowed! */ |
161 else if (streq (sect, "bss")) kind = GHS_SECTION_KIND_BSS; | 166 else if (streq (sect, "bss")) kind = GHS_SECTION_KIND_BSS; |
162 else if (streq (sect, "zbss")) kind = GHS_SECTION_KIND_ZDATA; | 167 else if (streq (sect, "zbss")) kind = GHS_SECTION_KIND_ZDATA; |
163 else | 168 else |
164 { | 169 { |
165 warning (0, "unrecognized section name \"%s\"", sect); | 170 warning (0, "unrecognized section name %qE", sect_ident); |
166 return; | 171 return; |
167 } | 172 } |
168 | 173 |
169 if (streq (alias, "default")) | 174 if (streq (alias, "default")) |
170 GHS_current_section_names [kind] = NULL; | 175 GHS_current_section_names [kind] = NULL; |