#include "target.h"
#include "cgraph.h"
#include "plugin.h"
+#include "except.h"
\f
/* Initialization routine for this file. */
p_kind = c_parser_peek_token (parser)->pragma_kind;
c_parser_consume_pragma (parser);
- /* For all constructs below except #pragma omp atomic
- MUST_NOT_THROW catch handlers are needed when exceptions
- are enabled. */
- if (p_kind != PRAGMA_OMP_ATOMIC)
- c_maybe_initialize_eh ();
-
switch (p_kind)
{
case PRAGMA_OMP_ATOMIC:
the_parser = GGC_NEW (c_parser);
*the_parser = tparser;
+ /* Initialize EH, if we've been told to do so. */
+ if (flag_exceptions)
+ {
+ default_init_unwind_resume_libfunc ();
+ using_eh_for_cleanups ();
+ }
+
c_parser_translation_unit (the_parser);
the_parser = NULL;
}