Commit 4a08009e by Jakub Jelinek Committed by Jakub Jelinek

re PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node'…

re PR c/90677 (gcc-9.1.0 fails to build __gcc_diag__ souce: error: 'cgraph_node' is not defined as a type)

	PR c/90677
	* cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
	has not been found, rather than error_mark_node.

	* c-c++-common/pr90677-2.c: New test.

From-SVN: r279840
parent f782b667
2020-01-02 Jakub Jelinek <jakub@redhat.com>
PR c/90677
* cp-objcp-common.c (identifier_global_tag): Return NULL_TREE if name
has not been found, rather than error_mark_node.
2020-01-01 Jakub Jelinek <jakub@redhat.com> 2020-01-01 Jakub Jelinek <jakub@redhat.com>
Update copyright years. Update copyright years.
......
...@@ -354,8 +354,11 @@ identifier_global_value (tree name) ...@@ -354,8 +354,11 @@ identifier_global_value (tree name)
tree tree
identifier_global_tag (tree name) identifier_global_tag (tree name)
{ {
return lookup_qualified_name (global_namespace, name, /*prefer_type*/2, tree ret = lookup_qualified_name (global_namespace, name, /*prefer_type*/2,
/*complain*/false); /*complain*/false);
if (ret == error_mark_node)
return NULL_TREE;
return ret;
} }
/* Returns true if NAME refers to a built-in function or function-like /* Returns true if NAME refers to a built-in function or function-like
......
2020-01-02 Jakub Jelinek <jakub@redhat.com>
PR c/90677
* c-c++-common/pr90677-2.c: New test.
2020-01-02 Dennis Zhang <dennis.zhang@arm.com> 2020-01-02 Dennis Zhang <dennis.zhang@arm.com>
* gcc.target/arm/multilib.exp: Add combination tests for armv8.6-a. * gcc.target/arm/multilib.exp: Add combination tests for armv8.6-a.
......
/* PR c/90677 */
/* { dg-do compile } */
/* { dg-options "-W -Wall" } */
extern void foo (int, int, const char *, ...)
__attribute__ ((__format__ (__gcc_tdiag__, 3, 4)));
struct cgraph_node;
extern void bar (struct cgraph_node *);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment