+2019-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-parser.c (c_parser_translation_unit): Diagnose declare target
+ without corresponding end declare target.
+
2019-11-08 Richard Sandiford <richard.sandiford@arm.com>
* c-convert.c (convert): Only handle vector conversions if one of
FOR_EACH_VEC_ELT (incomplete_record_decls, i, decl)
if (DECL_SIZE (decl) == NULL_TREE && TREE_TYPE (decl) != error_mark_node)
error ("storage size of %q+D isn%'t known", decl);
+
+ if (current_omp_declare_target_attribute)
+ {
+ if (!errorcount)
+ error ("%<#pragma omp declare target%> without corresponding "
+ "%<#pragma omp end declare target%>");
+ current_omp_declare_target_attribute = 0;
+ }
}
/* Parse an external declaration (C90 6.7, C99 6.9, C11 6.9).
+2019-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ * semantics.c (finish_translation_unit): Diagnose declare target
+ without corresponding end declare target.
+
2019-11-10 Jason Merrill <jason@redhat.com>
Implement D1957R0, T* to bool should be considered narrowing.
/* Do file scope __FUNCTION__ et al. */
finish_fname_decls ();
+
+ if (scope_chain->omp_declare_target_attribute)
+ {
+ if (!errorcount)
+ error ("%<#pragma omp declare target%> without corresponding "
+ "%<#pragma omp end declare target%>");
+ scope_chain->omp_declare_target_attribute = 0;
+ }
}
/* Finish a template type parameter, specified as AGGR IDENTIFIER.
+2019-11-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/declare-target-5.c: New test.
+
2019-11-11 Richard Sandiford <richard.sandiford@arm.com>
* gcc.dg/vect/pr92420.c: New test.
--- /dev/null
+#pragma omp declare target
+void foo (void); /* { dg-error "'#pragma omp declare target' without corresponding '#pragma omp end declare target'" } */