]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/c-family/c-pragma.c
Remove unnecessary VEC function overloads.
[thirdparty/gcc.git] / gcc / c-family / c-pragma.c
1 /* Handle #pragma, system V.4 style. Supports #pragma weak and #pragma pack.
2 Copyright (C) 1992, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
3 2006, 2007, 2008, 2009, 2010, 2012 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 3, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING3. If not see
19 <http://www.gnu.org/licenses/>. */
20
21 #include "config.h"
22 #include "system.h"
23 #include "coretypes.h"
24 #include "tm.h"
25 #include "tree.h"
26 #include "function.h" /* For cfun. FIXME: Does the parser know
27 when it is inside a function, so that
28 we don't have to look at cfun? */
29 #include "cpplib.h"
30 #include "c-pragma.h"
31 #include "flags.h"
32 #include "c-common.h"
33 #include "tm_p.h" /* For REGISTER_TARGET_PRAGMAS (why is
34 this not a target hook?). */
35 #include "vec.h"
36 #include "vecprim.h"
37 #include "target.h"
38 #include "diagnostic.h"
39 #include "opts.h"
40 #include "plugin.h"
41 #include "cgraph.h"
42
43 #define GCC_BAD(gmsgid) \
44 do { warning (OPT_Wpragmas, gmsgid); return; } while (0)
45 #define GCC_BAD2(gmsgid, arg) \
46 do { warning (OPT_Wpragmas, gmsgid, arg); return; } while (0)
47
48 typedef struct GTY(()) align_stack {
49 int alignment;
50 tree id;
51 struct align_stack * prev;
52 } align_stack;
53
54 static GTY(()) struct align_stack * alignment_stack;
55
56 static void handle_pragma_pack (cpp_reader *);
57
58 /* If we have a "global" #pragma pack(<n>) in effect when the first
59 #pragma pack(push,<n>) is encountered, this stores the value of
60 maximum_field_alignment in effect. When the final pop_alignment()
61 happens, we restore the value to this, not to a value of 0 for
62 maximum_field_alignment. Value is in bits. */
63 static int default_alignment;
64 #define SET_GLOBAL_ALIGNMENT(ALIGN) (maximum_field_alignment = *(alignment_stack == NULL \
65 ? &default_alignment \
66 : &alignment_stack->alignment) = (ALIGN))
67
68 static void push_alignment (int, tree);
69 static void pop_alignment (tree);
70
71 /* Push an alignment value onto the stack. */
72 static void
73 push_alignment (int alignment, tree id)
74 {
75 align_stack * entry;
76
77 entry = ggc_alloc_align_stack ();
78
79 entry->alignment = alignment;
80 entry->id = id;
81 entry->prev = alignment_stack;
82
83 /* The current value of maximum_field_alignment is not necessarily
84 0 since there may be a #pragma pack(<n>) in effect; remember it
85 so that we can restore it after the final #pragma pop(). */
86 if (alignment_stack == NULL)
87 default_alignment = maximum_field_alignment;
88
89 alignment_stack = entry;
90
91 maximum_field_alignment = alignment;
92 }
93
94 /* Undo a push of an alignment onto the stack. */
95 static void
96 pop_alignment (tree id)
97 {
98 align_stack * entry;
99
100 if (alignment_stack == NULL)
101 GCC_BAD ("#pragma pack (pop) encountered without matching #pragma pack (push)");
102
103 /* If we got an identifier, strip away everything above the target
104 entry so that the next step will restore the state just below it. */
105 if (id)
106 {
107 for (entry = alignment_stack; entry; entry = entry->prev)
108 if (entry->id == id)
109 {
110 alignment_stack = entry;
111 break;
112 }
113 if (entry == NULL)
114 warning (OPT_Wpragmas, "\
115 #pragma pack(pop, %E) encountered without matching #pragma pack(push, %E)"
116 , id, id);
117 }
118
119 entry = alignment_stack->prev;
120
121 maximum_field_alignment = entry ? entry->alignment : default_alignment;
122
123 alignment_stack = entry;
124 }
125
126 /* #pragma pack ()
127 #pragma pack (N)
128
129 #pragma pack (push)
130 #pragma pack (push, N)
131 #pragma pack (push, ID)
132 #pragma pack (push, ID, N)
133 #pragma pack (pop)
134 #pragma pack (pop, ID) */
135 static void
136 handle_pragma_pack (cpp_reader * ARG_UNUSED (dummy))
137 {
138 tree x, id = 0;
139 int align = -1;
140 enum cpp_ttype token;
141 enum { set, push, pop } action;
142
143 if (pragma_lex (&x) != CPP_OPEN_PAREN)
144 GCC_BAD ("missing %<(%> after %<#pragma pack%> - ignored");
145
146 token = pragma_lex (&x);
147 if (token == CPP_CLOSE_PAREN)
148 {
149 action = set;
150 align = initial_max_fld_align;
151 }
152 else if (token == CPP_NUMBER)
153 {
154 if (TREE_CODE (x) != INTEGER_CST)
155 GCC_BAD ("invalid constant in %<#pragma pack%> - ignored");
156 align = TREE_INT_CST_LOW (x);
157 action = set;
158 if (pragma_lex (&x) != CPP_CLOSE_PAREN)
159 GCC_BAD ("malformed %<#pragma pack%> - ignored");
160 }
161 else if (token == CPP_NAME)
162 {
163 #define GCC_BAD_ACTION do { if (action != pop) \
164 GCC_BAD ("malformed %<#pragma pack(push[, id][, <n>])%> - ignored"); \
165 else \
166 GCC_BAD ("malformed %<#pragma pack(pop[, id])%> - ignored"); \
167 } while (0)
168
169 const char *op = IDENTIFIER_POINTER (x);
170 if (!strcmp (op, "push"))
171 action = push;
172 else if (!strcmp (op, "pop"))
173 action = pop;
174 else
175 GCC_BAD2 ("unknown action %qE for %<#pragma pack%> - ignored", x);
176
177 while ((token = pragma_lex (&x)) == CPP_COMMA)
178 {
179 token = pragma_lex (&x);
180 if (token == CPP_NAME && id == 0)
181 {
182 id = x;
183 }
184 else if (token == CPP_NUMBER && action == push && align == -1)
185 {
186 if (TREE_CODE (x) != INTEGER_CST)
187 GCC_BAD ("invalid constant in %<#pragma pack%> - ignored");
188 align = TREE_INT_CST_LOW (x);
189 if (align == -1)
190 action = set;
191 }
192 else
193 GCC_BAD_ACTION;
194 }
195
196 if (token != CPP_CLOSE_PAREN)
197 GCC_BAD_ACTION;
198 #undef GCC_BAD_ACTION
199 }
200 else
201 GCC_BAD ("malformed %<#pragma pack%> - ignored");
202
203 if (pragma_lex (&x) != CPP_EOF)
204 warning (OPT_Wpragmas, "junk at end of %<#pragma pack%>");
205
206 if (flag_pack_struct)
207 GCC_BAD ("#pragma pack has no effect with -fpack-struct - ignored");
208
209 if (action != pop)
210 switch (align)
211 {
212 case 0:
213 case 1:
214 case 2:
215 case 4:
216 case 8:
217 case 16:
218 align *= BITS_PER_UNIT;
219 break;
220 case -1:
221 if (action == push)
222 {
223 align = maximum_field_alignment;
224 break;
225 }
226 default:
227 GCC_BAD2 ("alignment must be a small power of two, not %d", align);
228 }
229
230 switch (action)
231 {
232 case set: SET_GLOBAL_ALIGNMENT (align); break;
233 case push: push_alignment (align, id); break;
234 case pop: pop_alignment (id); break;
235 }
236 }
237
238 typedef struct GTY(()) pending_weak_d
239 {
240 tree name;
241 tree value;
242 } pending_weak;
243
244 DEF_VEC_O(pending_weak);
245 DEF_VEC_ALLOC_O(pending_weak,gc);
246
247 static GTY(()) VEC(pending_weak,gc) *pending_weaks;
248
249 static void apply_pragma_weak (tree, tree);
250 static void handle_pragma_weak (cpp_reader *);
251
252 static void
253 apply_pragma_weak (tree decl, tree value)
254 {
255 if (value)
256 {
257 value = build_string (IDENTIFIER_LENGTH (value),
258 IDENTIFIER_POINTER (value));
259 decl_attributes (&decl, build_tree_list (get_identifier ("alias"),
260 build_tree_list (NULL, value)),
261 0);
262 }
263
264 if (SUPPORTS_WEAK && DECL_EXTERNAL (decl) && TREE_USED (decl)
265 && !DECL_WEAK (decl) /* Don't complain about a redundant #pragma. */
266 && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))
267 warning (OPT_Wpragmas, "applying #pragma weak %q+D after first use "
268 "results in unspecified behavior", decl);
269
270 declare_weak (decl);
271 }
272
273 void
274 maybe_apply_pragma_weak (tree decl)
275 {
276 tree id;
277 int i;
278 pending_weak *pe;
279
280 /* Avoid asking for DECL_ASSEMBLER_NAME when it's not needed. */
281
282 /* No weak symbols pending, take the short-cut. */
283 if (!pending_weaks)
284 return;
285 /* If it's not visible outside this file, it doesn't matter whether
286 it's weak. */
287 if (!DECL_EXTERNAL (decl) && !TREE_PUBLIC (decl))
288 return;
289 /* If it's not a function or a variable, it can't be weak.
290 FIXME: what kinds of things are visible outside this file but
291 aren't functions or variables? Should this be an assert instead? */
292 if (TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL)
293 return;
294
295 id = DECL_ASSEMBLER_NAME (decl);
296
297 FOR_EACH_VEC_ELT (pending_weak, pending_weaks, i, pe)
298 if (id == pe->name)
299 {
300 apply_pragma_weak (decl, pe->value);
301 VEC_unordered_remove (pending_weak, pending_weaks, i);
302 break;
303 }
304 }
305
306 /* Process all "#pragma weak A = B" directives where we have not seen
307 a decl for A. */
308 void
309 maybe_apply_pending_pragma_weaks (void)
310 {
311 tree alias_id, id, decl;
312 int i;
313 pending_weak *pe;
314 symtab_node target;
315
316 FOR_EACH_VEC_ELT (pending_weak, pending_weaks, i, pe)
317 {
318 alias_id = pe->name;
319 id = pe->value;
320
321 if (id == NULL)
322 continue;
323
324 target = symtab_node_for_asm (id);
325 decl = build_decl (UNKNOWN_LOCATION,
326 target ? TREE_CODE (target->symbol.decl) : FUNCTION_DECL,
327 alias_id, default_function_type);
328
329 DECL_ARTIFICIAL (decl) = 1;
330 TREE_PUBLIC (decl) = 1;
331 DECL_WEAK (decl) = 1;
332 if (TREE_CODE (decl) == VAR_DECL)
333 TREE_STATIC (decl) = 1;
334 if (!target)
335 {
336 error ("%q+D aliased to undefined symbol %qE",
337 decl, id);
338 continue;
339 }
340
341 assemble_alias (decl, id);
342 }
343 }
344
345 /* #pragma weak name [= value] */
346 static void
347 handle_pragma_weak (cpp_reader * ARG_UNUSED (dummy))
348 {
349 tree name, value, x, decl;
350 enum cpp_ttype t;
351
352 value = 0;
353
354 if (pragma_lex (&name) != CPP_NAME)
355 GCC_BAD ("malformed #pragma weak, ignored");
356 t = pragma_lex (&x);
357 if (t == CPP_EQ)
358 {
359 if (pragma_lex (&value) != CPP_NAME)
360 GCC_BAD ("malformed #pragma weak, ignored");
361 t = pragma_lex (&x);
362 }
363 if (t != CPP_EOF)
364 warning (OPT_Wpragmas, "junk at end of %<#pragma weak%>");
365
366 decl = identifier_global_value (name);
367 if (decl && DECL_P (decl))
368 {
369 apply_pragma_weak (decl, value);
370 if (value)
371 assemble_alias (decl, value);
372 }
373 else
374 {
375 pending_weak pe = {name, value};
376 VEC_safe_push (pending_weak, gc, pending_weaks, pe);
377 }
378 }
379
380 /* GCC supports two #pragma directives for renaming the external
381 symbol associated with a declaration (DECL_ASSEMBLER_NAME), for
382 compatibility with the Solaris and VMS system headers. GCC also
383 has its own notation for this, __asm__("name") annotations.
384
385 Corner cases of these features and their interaction:
386
387 1) Both pragmas silently apply only to declarations with external
388 linkage (that is, TREE_PUBLIC || DECL_EXTERNAL). Asm labels
389 do not have this restriction.
390
391 2) In C++, both #pragmas silently apply only to extern "C" declarations.
392 Asm labels do not have this restriction.
393
394 3) If any of the three ways of changing DECL_ASSEMBLER_NAME is
395 applied to a decl whose DECL_ASSEMBLER_NAME is already set, and the
396 new name is different, a warning issues and the name does not change.
397
398 4) The "source name" for #pragma redefine_extname is the DECL_NAME,
399 *not* the DECL_ASSEMBLER_NAME.
400
401 5) If #pragma extern_prefix is in effect and a declaration occurs
402 with an __asm__ name, the #pragma extern_prefix is silently
403 ignored for that declaration.
404
405 6) If #pragma extern_prefix and #pragma redefine_extname apply to
406 the same declaration, whichever triggered first wins, and a warning
407 is issued. (We would like to have #pragma redefine_extname always
408 win, but it can appear either before or after the declaration, and
409 if it appears afterward, we have no way of knowing whether a modified
410 DECL_ASSEMBLER_NAME is due to #pragma extern_prefix.) */
411
412 typedef struct GTY(()) pending_redefinition_d {
413 tree oldname;
414 tree newname;
415 } pending_redefinition;
416
417 DEF_VEC_O(pending_redefinition);
418 DEF_VEC_ALLOC_O(pending_redefinition,gc);
419
420 static GTY(()) VEC(pending_redefinition,gc) *pending_redefine_extname;
421
422 static void handle_pragma_redefine_extname (cpp_reader *);
423
424 /* #pragma redefine_extname oldname newname */
425 static void
426 handle_pragma_redefine_extname (cpp_reader * ARG_UNUSED (dummy))
427 {
428 tree oldname, newname, decls, x;
429 enum cpp_ttype t;
430 bool found;
431
432 if (pragma_lex (&oldname) != CPP_NAME)
433 GCC_BAD ("malformed #pragma redefine_extname, ignored");
434 if (pragma_lex (&newname) != CPP_NAME)
435 GCC_BAD ("malformed #pragma redefine_extname, ignored");
436 t = pragma_lex (&x);
437 if (t != CPP_EOF)
438 warning (OPT_Wpragmas, "junk at end of %<#pragma redefine_extname%>");
439
440 found = false;
441 for (decls = c_linkage_bindings (oldname);
442 decls; )
443 {
444 tree decl;
445 if (TREE_CODE (decls) == TREE_LIST)
446 {
447 decl = TREE_VALUE (decls);
448 decls = TREE_CHAIN (decls);
449 }
450 else
451 {
452 decl = decls;
453 decls = NULL_TREE;
454 }
455
456 if ((TREE_PUBLIC (decl) || DECL_EXTERNAL (decl))
457 && (TREE_CODE (decl) == FUNCTION_DECL
458 || TREE_CODE (decl) == VAR_DECL))
459 {
460 found = true;
461 if (DECL_ASSEMBLER_NAME_SET_P (decl))
462 {
463 const char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
464 name = targetm.strip_name_encoding (name);
465
466 if (strcmp (name, IDENTIFIER_POINTER (newname)))
467 warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
468 "conflict with previous rename");
469 }
470 else
471 change_decl_assembler_name (decl, newname);
472 }
473 }
474
475 if (!found)
476 /* We have to add this to the rename list even if there's already
477 a global value that doesn't meet the above criteria, because in
478 C++ "struct foo {...};" puts "foo" in the current namespace but
479 does *not* conflict with a subsequent declaration of a function
480 or variable foo. See g++.dg/other/pragma-re-2.C. */
481 add_to_renaming_pragma_list (oldname, newname);
482 }
483
484 /* This is called from here and from ia64.c. */
485 void
486 add_to_renaming_pragma_list (tree oldname, tree newname)
487 {
488 unsigned ix;
489 pending_redefinition *p;
490
491 FOR_EACH_VEC_ELT (pending_redefinition, pending_redefine_extname, ix, p)
492 if (oldname == p->oldname)
493 {
494 if (p->newname != newname)
495 warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
496 "conflict with previous #pragma redefine_extname");
497 return;
498 }
499
500 pending_redefinition e = {oldname, newname};
501 VEC_safe_push (pending_redefinition, gc, pending_redefine_extname, e);
502 }
503
504 /* The current prefix set by #pragma extern_prefix. */
505 GTY(()) tree pragma_extern_prefix;
506
507 /* Hook from the front ends to apply the results of one of the preceding
508 pragmas that rename variables. */
509
510 tree
511 maybe_apply_renaming_pragma (tree decl, tree asmname)
512 {
513 unsigned ix;
514 pending_redefinition *p;
515
516 /* The renaming pragmas are only applied to declarations with
517 external linkage. */
518 if ((TREE_CODE (decl) != FUNCTION_DECL && TREE_CODE (decl) != VAR_DECL)
519 || (!TREE_PUBLIC (decl) && !DECL_EXTERNAL (decl))
520 || !has_c_linkage (decl))
521 return asmname;
522
523 /* If the DECL_ASSEMBLER_NAME is already set, it does not change,
524 but we may warn about a rename that conflicts. */
525 if (DECL_ASSEMBLER_NAME_SET_P (decl))
526 {
527 const char *oldname = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
528 oldname = targetm.strip_name_encoding (oldname);
529
530 if (asmname && strcmp (TREE_STRING_POINTER (asmname), oldname))
531 warning (OPT_Wpragmas, "asm declaration ignored due to "
532 "conflict with previous rename");
533
534 /* Take any pending redefine_extname off the list. */
535 FOR_EACH_VEC_ELT (pending_redefinition, pending_redefine_extname, ix, p)
536 if (DECL_NAME (decl) == p->oldname)
537 {
538 /* Only warn if there is a conflict. */
539 if (strcmp (IDENTIFIER_POINTER (p->newname), oldname))
540 warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
541 "conflict with previous rename");
542
543 VEC_unordered_remove (pending_redefinition,
544 pending_redefine_extname, ix);
545 break;
546 }
547 return 0;
548 }
549
550 /* Find out if we have a pending #pragma redefine_extname. */
551 FOR_EACH_VEC_ELT (pending_redefinition, pending_redefine_extname, ix, p)
552 if (DECL_NAME (decl) == p->oldname)
553 {
554 tree newname = p->newname;
555 VEC_unordered_remove (pending_redefinition,
556 pending_redefine_extname, ix);
557
558 /* If we already have an asmname, #pragma redefine_extname is
559 ignored (with a warning if it conflicts). */
560 if (asmname)
561 {
562 if (strcmp (TREE_STRING_POINTER (asmname),
563 IDENTIFIER_POINTER (newname)) != 0)
564 warning (OPT_Wpragmas, "#pragma redefine_extname ignored due to "
565 "conflict with __asm__ declaration");
566 return asmname;
567 }
568
569 /* Otherwise we use what we've got; #pragma extern_prefix is
570 silently ignored. */
571 return build_string (IDENTIFIER_LENGTH (newname),
572 IDENTIFIER_POINTER (newname));
573 }
574
575 /* If we've got an asmname, #pragma extern_prefix is silently ignored. */
576 if (asmname)
577 return asmname;
578
579 /* If #pragma extern_prefix is in effect, apply it. */
580 if (pragma_extern_prefix)
581 {
582 const char *prefix = TREE_STRING_POINTER (pragma_extern_prefix);
583 size_t plen = TREE_STRING_LENGTH (pragma_extern_prefix) - 1;
584
585 const char *id = IDENTIFIER_POINTER (DECL_NAME (decl));
586 size_t ilen = IDENTIFIER_LENGTH (DECL_NAME (decl));
587
588 char *newname = (char *) alloca (plen + ilen + 1);
589
590 memcpy (newname, prefix, plen);
591 memcpy (newname + plen, id, ilen + 1);
592
593 return build_string (plen + ilen, newname);
594 }
595
596 /* Nada. */
597 return 0;
598 }
599
600
601 static void handle_pragma_visibility (cpp_reader *);
602
603 static VEC (int, heap) *visstack;
604
605 /* Push the visibility indicated by STR onto the top of the #pragma
606 visibility stack. KIND is 0 for #pragma GCC visibility, 1 for
607 C++ namespace with visibility attribute and 2 for C++ builtin
608 ABI namespace. push_visibility/pop_visibility calls must have
609 matching KIND, it is not allowed to push visibility using one
610 KIND and pop using a different one. */
611
612 void
613 push_visibility (const char *str, int kind)
614 {
615 VEC_safe_push (int, heap, visstack,
616 ((int) default_visibility) | (kind << 8));
617 if (!strcmp (str, "default"))
618 default_visibility = VISIBILITY_DEFAULT;
619 else if (!strcmp (str, "internal"))
620 default_visibility = VISIBILITY_INTERNAL;
621 else if (!strcmp (str, "hidden"))
622 default_visibility = VISIBILITY_HIDDEN;
623 else if (!strcmp (str, "protected"))
624 default_visibility = VISIBILITY_PROTECTED;
625 else
626 GCC_BAD ("#pragma GCC visibility push() must specify default, internal, hidden or protected");
627 visibility_options.inpragma = 1;
628 }
629
630 /* Pop a level of the #pragma visibility stack. Return true if
631 successful. */
632
633 bool
634 pop_visibility (int kind)
635 {
636 if (!VEC_length (int, visstack))
637 return false;
638 if ((VEC_last (int, visstack) >> 8) != kind)
639 return false;
640 default_visibility
641 = (enum symbol_visibility) (VEC_pop (int, visstack) & 0xff);
642 visibility_options.inpragma
643 = VEC_length (int, visstack) != 0;
644 return true;
645 }
646
647 /* Sets the default visibility for symbols to something other than that
648 specified on the command line. */
649
650 static void
651 handle_pragma_visibility (cpp_reader *dummy ATTRIBUTE_UNUSED)
652 {
653 /* Form is #pragma GCC visibility push(hidden)|pop */
654 tree x;
655 enum cpp_ttype token;
656 enum { bad, push, pop } action = bad;
657
658 token = pragma_lex (&x);
659 if (token == CPP_NAME)
660 {
661 const char *op = IDENTIFIER_POINTER (x);
662 if (!strcmp (op, "push"))
663 action = push;
664 else if (!strcmp (op, "pop"))
665 action = pop;
666 }
667 if (bad == action)
668 GCC_BAD ("#pragma GCC visibility must be followed by push or pop");
669 else
670 {
671 if (pop == action)
672 {
673 if (! pop_visibility (0))
674 GCC_BAD ("no matching push for %<#pragma GCC visibility pop%>");
675 }
676 else
677 {
678 if (pragma_lex (&x) != CPP_OPEN_PAREN)
679 GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
680 token = pragma_lex (&x);
681 if (token != CPP_NAME)
682 GCC_BAD ("malformed #pragma GCC visibility push");
683 else
684 push_visibility (IDENTIFIER_POINTER (x), 0);
685 if (pragma_lex (&x) != CPP_CLOSE_PAREN)
686 GCC_BAD ("missing %<(%> after %<#pragma GCC visibility push%> - ignored");
687 }
688 }
689 if (pragma_lex (&x) != CPP_EOF)
690 warning (OPT_Wpragmas, "junk at end of %<#pragma GCC visibility%>");
691 }
692
693 static void
694 handle_pragma_diagnostic(cpp_reader *ARG_UNUSED(dummy))
695 {
696 const char *kind_string, *option_string;
697 unsigned int option_index;
698 enum cpp_ttype token;
699 diagnostic_t kind;
700 tree x;
701 struct cl_option_handlers handlers;
702
703 token = pragma_lex (&x);
704 if (token != CPP_NAME)
705 GCC_BAD ("missing [error|warning|ignored] after %<#pragma GCC diagnostic%>");
706 kind_string = IDENTIFIER_POINTER (x);
707 if (strcmp (kind_string, "error") == 0)
708 kind = DK_ERROR;
709 else if (strcmp (kind_string, "warning") == 0)
710 kind = DK_WARNING;
711 else if (strcmp (kind_string, "ignored") == 0)
712 kind = DK_IGNORED;
713 else if (strcmp (kind_string, "push") == 0)
714 {
715 diagnostic_push_diagnostics (global_dc, input_location);
716 return;
717 }
718 else if (strcmp (kind_string, "pop") == 0)
719 {
720 diagnostic_pop_diagnostics (global_dc, input_location);
721 return;
722 }
723 else
724 GCC_BAD ("expected [error|warning|ignored|push|pop] after %<#pragma GCC diagnostic%>");
725
726 token = pragma_lex (&x);
727 if (token != CPP_STRING)
728 GCC_BAD ("missing option after %<#pragma GCC diagnostic%> kind");
729 option_string = TREE_STRING_POINTER (x);
730 set_default_handlers (&handlers);
731 for (option_index = 0; option_index < cl_options_count; option_index++)
732 if (strcmp (cl_options[option_index].opt_text, option_string) == 0)
733 {
734 control_warning_option (option_index, (int) kind, kind != DK_IGNORED,
735 input_location, c_family_lang_mask, &handlers,
736 &global_options, &global_options_set,
737 global_dc);
738 return;
739 }
740 GCC_BAD ("unknown option after %<#pragma GCC diagnostic%> kind");
741 }
742
743 /* Parse #pragma GCC target (xxx) to set target specific options. */
744 static void
745 handle_pragma_target(cpp_reader *ARG_UNUSED(dummy))
746 {
747 enum cpp_ttype token;
748 tree x;
749 bool close_paren_needed_p = false;
750
751 if (cfun)
752 {
753 error ("#pragma GCC option is not allowed inside functions");
754 return;
755 }
756
757 token = pragma_lex (&x);
758 if (token == CPP_OPEN_PAREN)
759 {
760 close_paren_needed_p = true;
761 token = pragma_lex (&x);
762 }
763
764 if (token != CPP_STRING)
765 {
766 GCC_BAD ("%<#pragma GCC option%> is not a string");
767 return;
768 }
769
770 /* Strings are user options. */
771 else
772 {
773 tree args = NULL_TREE;
774
775 do
776 {
777 /* Build up the strings now as a tree linked list. Skip empty
778 strings. */
779 if (TREE_STRING_LENGTH (x) > 0)
780 args = tree_cons (NULL_TREE, x, args);
781
782 token = pragma_lex (&x);
783 while (token == CPP_COMMA)
784 token = pragma_lex (&x);
785 }
786 while (token == CPP_STRING);
787
788 if (close_paren_needed_p)
789 {
790 if (token == CPP_CLOSE_PAREN)
791 token = pragma_lex (&x);
792 else
793 GCC_BAD ("%<#pragma GCC target (string [,string]...)%> does "
794 "not have a final %<)%>");
795 }
796
797 if (token != CPP_EOF)
798 {
799 error ("#pragma GCC target string... is badly formed");
800 return;
801 }
802
803 /* put arguments in the order the user typed them. */
804 args = nreverse (args);
805
806 if (targetm.target_option.pragma_parse (args, NULL_TREE))
807 current_target_pragma = args;
808 }
809 }
810
811 /* Handle #pragma GCC optimize to set optimization options. */
812 static void
813 handle_pragma_optimize (cpp_reader *ARG_UNUSED(dummy))
814 {
815 enum cpp_ttype token;
816 tree x;
817 bool close_paren_needed_p = false;
818 tree optimization_previous_node = optimization_current_node;
819
820 if (cfun)
821 {
822 error ("#pragma GCC optimize is not allowed inside functions");
823 return;
824 }
825
826 token = pragma_lex (&x);
827 if (token == CPP_OPEN_PAREN)
828 {
829 close_paren_needed_p = true;
830 token = pragma_lex (&x);
831 }
832
833 if (token != CPP_STRING && token != CPP_NUMBER)
834 {
835 GCC_BAD ("%<#pragma GCC optimize%> is not a string or number");
836 return;
837 }
838
839 /* Strings/numbers are user options. */
840 else
841 {
842 tree args = NULL_TREE;
843
844 do
845 {
846 /* Build up the numbers/strings now as a list. */
847 if (token != CPP_STRING || TREE_STRING_LENGTH (x) > 0)
848 args = tree_cons (NULL_TREE, x, args);
849
850 token = pragma_lex (&x);
851 while (token == CPP_COMMA)
852 token = pragma_lex (&x);
853 }
854 while (token == CPP_STRING || token == CPP_NUMBER);
855
856 if (close_paren_needed_p)
857 {
858 if (token == CPP_CLOSE_PAREN)
859 token = pragma_lex (&x);
860 else
861 GCC_BAD ("%<#pragma GCC optimize (string [,string]...)%> does "
862 "not have a final %<)%>");
863 }
864
865 if (token != CPP_EOF)
866 {
867 error ("#pragma GCC optimize string... is badly formed");
868 return;
869 }
870
871 /* put arguments in the order the user typed them. */
872 args = nreverse (args);
873
874 parse_optimize_options (args, false);
875 current_optimize_pragma = chainon (current_optimize_pragma, args);
876 optimization_current_node = build_optimization_node ();
877 c_cpp_builtins_optimize_pragma (parse_in,
878 optimization_previous_node,
879 optimization_current_node);
880 }
881 }
882
883 /* Stack of the #pragma GCC options created with #pragma GCC push_option. Save
884 both the binary representation of the options and the TREE_LIST of
885 strings that will be added to the function's attribute list. */
886 typedef struct GTY(()) opt_stack {
887 struct opt_stack *prev;
888 tree target_binary;
889 tree target_strings;
890 tree optimize_binary;
891 tree optimize_strings;
892 } opt_stack;
893
894 static GTY(()) struct opt_stack * options_stack;
895
896 /* Handle #pragma GCC push_options to save the current target and optimization
897 options. */
898
899 static void
900 handle_pragma_push_options (cpp_reader *ARG_UNUSED(dummy))
901 {
902 enum cpp_ttype token;
903 tree x = 0;
904 opt_stack *p;
905
906 token = pragma_lex (&x);
907 if (token != CPP_EOF)
908 {
909 warning (OPT_Wpragmas, "junk at end of %<#pragma push_options%>");
910 return;
911 }
912
913 p = ggc_alloc_opt_stack ();
914 p->prev = options_stack;
915 options_stack = p;
916
917 /* Save optimization and target flags in binary format. */
918 p->optimize_binary = build_optimization_node ();
919 p->target_binary = build_target_option_node ();
920
921 /* Save optimization and target flags in string list format. */
922 p->optimize_strings = copy_list (current_optimize_pragma);
923 p->target_strings = copy_list (current_target_pragma);
924 }
925
926 /* Handle #pragma GCC pop_options to restore the current target and
927 optimization options from a previous push_options. */
928
929 static void
930 handle_pragma_pop_options (cpp_reader *ARG_UNUSED(dummy))
931 {
932 enum cpp_ttype token;
933 tree x = 0;
934 opt_stack *p;
935
936 token = pragma_lex (&x);
937 if (token != CPP_EOF)
938 {
939 warning (OPT_Wpragmas, "junk at end of %<#pragma pop_options%>");
940 return;
941 }
942
943 if (! options_stack)
944 {
945 warning (OPT_Wpragmas,
946 "%<#pragma GCC pop_options%> without a corresponding "
947 "%<#pragma GCC push_options%>");
948 return;
949 }
950
951 p = options_stack;
952 options_stack = p->prev;
953
954 if (p->target_binary != target_option_current_node)
955 {
956 (void) targetm.target_option.pragma_parse (NULL_TREE, p->target_binary);
957 target_option_current_node = p->target_binary;
958 }
959
960 if (p->optimize_binary != optimization_current_node)
961 {
962 tree old_optimize = optimization_current_node;
963 cl_optimization_restore (&global_options,
964 TREE_OPTIMIZATION (p->optimize_binary));
965 c_cpp_builtins_optimize_pragma (parse_in, old_optimize,
966 p->optimize_binary);
967 optimization_current_node = p->optimize_binary;
968 }
969
970 current_target_pragma = p->target_strings;
971 current_optimize_pragma = p->optimize_strings;
972 }
973
974 /* Handle #pragma GCC reset_options to restore the current target and
975 optimization options to the original options used on the command line. */
976
977 static void
978 handle_pragma_reset_options (cpp_reader *ARG_UNUSED(dummy))
979 {
980 enum cpp_ttype token;
981 tree x = 0;
982 tree new_optimize = optimization_default_node;
983 tree new_target = target_option_default_node;
984
985 token = pragma_lex (&x);
986 if (token != CPP_EOF)
987 {
988 warning (OPT_Wpragmas, "junk at end of %<#pragma reset_options%>");
989 return;
990 }
991
992 if (new_target != target_option_current_node)
993 {
994 (void) targetm.target_option.pragma_parse (NULL_TREE, new_target);
995 target_option_current_node = new_target;
996 }
997
998 if (new_optimize != optimization_current_node)
999 {
1000 tree old_optimize = optimization_current_node;
1001 cl_optimization_restore (&global_options,
1002 TREE_OPTIMIZATION (new_optimize));
1003 c_cpp_builtins_optimize_pragma (parse_in, old_optimize, new_optimize);
1004 optimization_current_node = new_optimize;
1005 }
1006
1007 current_target_pragma = NULL_TREE;
1008 current_optimize_pragma = NULL_TREE;
1009 }
1010
1011 /* Print a plain user-specified message. */
1012
1013 static void
1014 handle_pragma_message (cpp_reader *ARG_UNUSED(dummy))
1015 {
1016 enum cpp_ttype token;
1017 tree x, message = 0;
1018
1019 token = pragma_lex (&x);
1020 if (token == CPP_OPEN_PAREN)
1021 {
1022 token = pragma_lex (&x);
1023 if (token == CPP_STRING)
1024 message = x;
1025 else
1026 GCC_BAD ("expected a string after %<#pragma message%>");
1027 if (pragma_lex (&x) != CPP_CLOSE_PAREN)
1028 GCC_BAD ("malformed %<#pragma message%>, ignored");
1029 }
1030 else if (token == CPP_STRING)
1031 message = x;
1032 else
1033 GCC_BAD ("expected a string after %<#pragma message%>");
1034
1035 gcc_assert (message);
1036
1037 if (pragma_lex (&x) != CPP_EOF)
1038 warning (OPT_Wpragmas, "junk at end of %<#pragma message%>");
1039
1040 if (TREE_STRING_LENGTH (message) > 1)
1041 inform (input_location, "#pragma message: %s", TREE_STRING_POINTER (message));
1042 }
1043
1044 /* Mark whether the current location is valid for a STDC pragma. */
1045
1046 static bool valid_location_for_stdc_pragma;
1047
1048 void
1049 mark_valid_location_for_stdc_pragma (bool flag)
1050 {
1051 valid_location_for_stdc_pragma = flag;
1052 }
1053
1054 /* Return true if the current location is valid for a STDC pragma. */
1055
1056 bool
1057 valid_location_for_stdc_pragma_p (void)
1058 {
1059 return valid_location_for_stdc_pragma;
1060 }
1061
1062 enum pragma_switch_t { PRAGMA_ON, PRAGMA_OFF, PRAGMA_DEFAULT, PRAGMA_BAD };
1063
1064 /* A STDC pragma must appear outside of external declarations or
1065 preceding all explicit declarations and statements inside a compound
1066 statement; its behavior is undefined if used in any other context.
1067 It takes a switch of ON, OFF, or DEFAULT. */
1068
1069 static enum pragma_switch_t
1070 handle_stdc_pragma (const char *pname)
1071 {
1072 const char *arg;
1073 tree t;
1074 enum pragma_switch_t ret;
1075
1076 if (!valid_location_for_stdc_pragma_p ())
1077 {
1078 warning (OPT_Wpragmas, "invalid location for %<pragma %s%>, ignored",
1079 pname);
1080 return PRAGMA_BAD;
1081 }
1082
1083 if (pragma_lex (&t) != CPP_NAME)
1084 {
1085 warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname);
1086 return PRAGMA_BAD;
1087 }
1088
1089 arg = IDENTIFIER_POINTER (t);
1090
1091 if (!strcmp (arg, "ON"))
1092 ret = PRAGMA_ON;
1093 else if (!strcmp (arg, "OFF"))
1094 ret = PRAGMA_OFF;
1095 else if (!strcmp (arg, "DEFAULT"))
1096 ret = PRAGMA_DEFAULT;
1097 else
1098 {
1099 warning (OPT_Wpragmas, "malformed %<#pragma %s%>, ignored", pname);
1100 return PRAGMA_BAD;
1101 }
1102
1103 if (pragma_lex (&t) != CPP_EOF)
1104 {
1105 warning (OPT_Wpragmas, "junk at end of %<#pragma %s%>", pname);
1106 return PRAGMA_BAD;
1107 }
1108
1109 return ret;
1110 }
1111
1112 /* #pragma STDC FLOAT_CONST_DECIMAL64 ON
1113 #pragma STDC FLOAT_CONST_DECIMAL64 OFF
1114 #pragma STDC FLOAT_CONST_DECIMAL64 DEFAULT */
1115
1116 static void
1117 handle_pragma_float_const_decimal64 (cpp_reader *ARG_UNUSED (dummy))
1118 {
1119 if (c_dialect_cxx ())
1120 {
1121 if (warn_unknown_pragmas > in_system_header)
1122 warning (OPT_Wunknown_pragmas,
1123 "%<#pragma STDC FLOAT_CONST_DECIMAL64%> is not supported"
1124 " for C++");
1125 return;
1126 }
1127
1128 if (!targetm.decimal_float_supported_p ())
1129 {
1130 if (warn_unknown_pragmas > in_system_header)
1131 warning (OPT_Wunknown_pragmas,
1132 "%<#pragma STDC FLOAT_CONST_DECIMAL64%> is not supported"
1133 " on this target");
1134 return;
1135 }
1136
1137 pedwarn (input_location, OPT_Wpedantic,
1138 "ISO C does not support %<#pragma STDC FLOAT_CONST_DECIMAL64%>");
1139
1140 switch (handle_stdc_pragma ("STDC FLOAT_CONST_DECIMAL64"))
1141 {
1142 case PRAGMA_ON:
1143 set_float_const_decimal64 ();
1144 break;
1145 case PRAGMA_OFF:
1146 case PRAGMA_DEFAULT:
1147 clear_float_const_decimal64 ();
1148 break;
1149 case PRAGMA_BAD:
1150 break;
1151 }
1152 }
1153
1154 /* A vector of registered pragma callbacks, which is never freed. */
1155 DEF_VEC_O (internal_pragma_handler);
1156 DEF_VEC_ALLOC_O (internal_pragma_handler, heap);
1157
1158 static VEC(internal_pragma_handler, heap) *registered_pragmas;
1159
1160 typedef struct
1161 {
1162 const char *space;
1163 const char *name;
1164 } pragma_ns_name;
1165
1166 DEF_VEC_O (pragma_ns_name);
1167 DEF_VEC_ALLOC_O (pragma_ns_name, heap);
1168
1169 static VEC(pragma_ns_name, heap) *registered_pp_pragmas;
1170
1171 struct omp_pragma_def { const char *name; unsigned int id; };
1172 static const struct omp_pragma_def omp_pragmas[] = {
1173 { "atomic", PRAGMA_OMP_ATOMIC },
1174 { "barrier", PRAGMA_OMP_BARRIER },
1175 { "critical", PRAGMA_OMP_CRITICAL },
1176 { "flush", PRAGMA_OMP_FLUSH },
1177 { "for", PRAGMA_OMP_FOR },
1178 { "master", PRAGMA_OMP_MASTER },
1179 { "ordered", PRAGMA_OMP_ORDERED },
1180 { "parallel", PRAGMA_OMP_PARALLEL },
1181 { "section", PRAGMA_OMP_SECTION },
1182 { "sections", PRAGMA_OMP_SECTIONS },
1183 { "single", PRAGMA_OMP_SINGLE },
1184 { "task", PRAGMA_OMP_TASK },
1185 { "taskwait", PRAGMA_OMP_TASKWAIT },
1186 { "taskyield", PRAGMA_OMP_TASKYIELD },
1187 { "threadprivate", PRAGMA_OMP_THREADPRIVATE }
1188 };
1189
1190 void
1191 c_pp_lookup_pragma (unsigned int id, const char **space, const char **name)
1192 {
1193 const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
1194 int i;
1195
1196 for (i = 0; i < n_omp_pragmas; ++i)
1197 if (omp_pragmas[i].id == id)
1198 {
1199 *space = "omp";
1200 *name = omp_pragmas[i].name;
1201 return;
1202 }
1203
1204 if (id >= PRAGMA_FIRST_EXTERNAL
1205 && (id < PRAGMA_FIRST_EXTERNAL
1206 + VEC_length (pragma_ns_name, registered_pp_pragmas)))
1207 {
1208 *space = VEC_index (pragma_ns_name, registered_pp_pragmas,
1209 id - PRAGMA_FIRST_EXTERNAL).space;
1210 *name = VEC_index (pragma_ns_name, registered_pp_pragmas,
1211 id - PRAGMA_FIRST_EXTERNAL).name;
1212 return;
1213 }
1214
1215 gcc_unreachable ();
1216 }
1217
1218 /* Front-end wrappers for pragma registration to avoid dragging
1219 cpplib.h in almost everywhere. */
1220
1221 static void
1222 c_register_pragma_1 (const char *space, const char *name,
1223 internal_pragma_handler ihandler, bool allow_expansion)
1224 {
1225 unsigned id;
1226
1227 if (flag_preprocess_only)
1228 {
1229 pragma_ns_name ns_name;
1230
1231 if (!allow_expansion)
1232 return;
1233
1234 ns_name.space = space;
1235 ns_name.name = name;
1236 VEC_safe_push (pragma_ns_name, heap, registered_pp_pragmas, ns_name);
1237 id = VEC_length (pragma_ns_name, registered_pp_pragmas);
1238 id += PRAGMA_FIRST_EXTERNAL - 1;
1239 }
1240 else
1241 {
1242 VEC_safe_push (internal_pragma_handler, heap, registered_pragmas,
1243 ihandler);
1244 id = VEC_length (internal_pragma_handler, registered_pragmas);
1245 id += PRAGMA_FIRST_EXTERNAL - 1;
1246
1247 /* The C++ front end allocates 6 bits in cp_token; the C front end
1248 allocates 7 bits in c_token. At present this is sufficient. */
1249 gcc_assert (id < 64);
1250 }
1251
1252 cpp_register_deferred_pragma (parse_in, space, name, id,
1253 allow_expansion, false);
1254 }
1255
1256 /* Register a C pragma handler, using a space and a name. It disallows pragma
1257 expansion (if you want it, use c_register_pragma_with_expansion instead). */
1258 void
1259 c_register_pragma (const char *space, const char *name,
1260 pragma_handler_1arg handler)
1261 {
1262 internal_pragma_handler ihandler;
1263
1264 ihandler.handler.handler_1arg = handler;
1265 ihandler.extra_data = false;
1266 ihandler.data = NULL;
1267 c_register_pragma_1 (space, name, ihandler, false);
1268 }
1269
1270 /* Register a C pragma handler, using a space and a name, it also carries an
1271 extra data field which can be used by the handler. It disallows pragma
1272 expansion (if you want it, use c_register_pragma_with_expansion_and_data
1273 instead). */
1274 void
1275 c_register_pragma_with_data (const char *space, const char *name,
1276 pragma_handler_2arg handler, void * data)
1277 {
1278 internal_pragma_handler ihandler;
1279
1280 ihandler.handler.handler_2arg = handler;
1281 ihandler.extra_data = true;
1282 ihandler.data = data;
1283 c_register_pragma_1 (space, name, ihandler, false);
1284 }
1285
1286 /* Register a C pragma handler, using a space and a name. It allows pragma
1287 expansion as in the following example:
1288
1289 #define NUMBER 10
1290 #pragma count (NUMBER)
1291
1292 Name expansion is still disallowed. */
1293 void
1294 c_register_pragma_with_expansion (const char *space, const char *name,
1295 pragma_handler_1arg handler)
1296 {
1297 internal_pragma_handler ihandler;
1298
1299 ihandler.handler.handler_1arg = handler;
1300 ihandler.extra_data = false;
1301 ihandler.data = NULL;
1302 c_register_pragma_1 (space, name, ihandler, true);
1303 }
1304
1305 /* Register a C pragma handler, using a space and a name, it also carries an
1306 extra data field which can be used by the handler. It allows pragma
1307 expansion as in the following example:
1308
1309 #define NUMBER 10
1310 #pragma count (NUMBER)
1311
1312 Name expansion is still disallowed. */
1313 void
1314 c_register_pragma_with_expansion_and_data (const char *space, const char *name,
1315 pragma_handler_2arg handler,
1316 void *data)
1317 {
1318 internal_pragma_handler ihandler;
1319
1320 ihandler.handler.handler_2arg = handler;
1321 ihandler.extra_data = true;
1322 ihandler.data = data;
1323 c_register_pragma_1 (space, name, ihandler, true);
1324 }
1325
1326 void
1327 c_invoke_pragma_handler (unsigned int id)
1328 {
1329 internal_pragma_handler *ihandler;
1330 pragma_handler_1arg handler_1arg;
1331 pragma_handler_2arg handler_2arg;
1332
1333 id -= PRAGMA_FIRST_EXTERNAL;
1334 ihandler = &VEC_index (internal_pragma_handler, registered_pragmas, id);
1335 if (ihandler->extra_data)
1336 {
1337 handler_2arg = ihandler->handler.handler_2arg;
1338 handler_2arg (parse_in, ihandler->data);
1339 }
1340 else
1341 {
1342 handler_1arg = ihandler->handler.handler_1arg;
1343 handler_1arg (parse_in);
1344 }
1345 }
1346
1347 /* Set up front-end pragmas. */
1348 void
1349 init_pragma (void)
1350 {
1351 if (flag_openmp)
1352 {
1353 const int n_omp_pragmas = sizeof (omp_pragmas) / sizeof (*omp_pragmas);
1354 int i;
1355
1356 for (i = 0; i < n_omp_pragmas; ++i)
1357 cpp_register_deferred_pragma (parse_in, "omp", omp_pragmas[i].name,
1358 omp_pragmas[i].id, true, true);
1359 }
1360
1361 if (!flag_preprocess_only)
1362 cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
1363 PRAGMA_GCC_PCH_PREPROCESS, false, false);
1364
1365 #ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
1366 c_register_pragma_with_expansion (0, "pack", handle_pragma_pack);
1367 #else
1368 c_register_pragma (0, "pack", handle_pragma_pack);
1369 #endif
1370 c_register_pragma (0, "weak", handle_pragma_weak);
1371 c_register_pragma ("GCC", "visibility", handle_pragma_visibility);
1372
1373 c_register_pragma ("GCC", "diagnostic", handle_pragma_diagnostic);
1374 c_register_pragma ("GCC", "target", handle_pragma_target);
1375 c_register_pragma ("GCC", "optimize", handle_pragma_optimize);
1376 c_register_pragma ("GCC", "push_options", handle_pragma_push_options);
1377 c_register_pragma ("GCC", "pop_options", handle_pragma_pop_options);
1378 c_register_pragma ("GCC", "reset_options", handle_pragma_reset_options);
1379
1380 c_register_pragma ("STDC", "FLOAT_CONST_DECIMAL64",
1381 handle_pragma_float_const_decimal64);
1382
1383 c_register_pragma_with_expansion (0, "redefine_extname",
1384 handle_pragma_redefine_extname);
1385
1386 c_register_pragma_with_expansion (0, "message", handle_pragma_message);
1387
1388 #ifdef REGISTER_TARGET_PRAGMAS
1389 REGISTER_TARGET_PRAGMAS ();
1390 #endif
1391
1392 /* Allow plugins to register their own pragmas. */
1393 invoke_plugin_callbacks (PLUGIN_PRAGMAS, NULL);
1394 }
1395
1396 #include "gt-c-family-c-pragma.h"