mirror of git://gcc.gnu.org/git/gcc.git
[BRIGFE] skip multiple forward declarations of the same function
From-SVN: r259950
This commit is contained in:
parent
60a3d46c17
commit
1e25c5a9bb
|
|
@ -1,3 +1,8 @@
|
||||||
|
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
|
||||||
|
|
||||||
|
* brig/brigfrontend/brig-function-handler.cc: Skip multiple forward
|
||||||
|
declarations of the same function.
|
||||||
|
|
||||||
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
|
2018-05-04 Pekka Jääskeläinen <pekka.jaaskelainen@parmance.com>
|
||||||
|
|
||||||
* brig/brig-lang.c: Do not allow optimizations based on known C
|
* brig/brig-lang.c: Do not allow optimizations based on known C
|
||||||
|
|
|
||||||
|
|
@ -80,6 +80,10 @@ brig_directive_function_handler::operator () (const BrigBase *base)
|
||||||
if (m_parent.m_analyzing)
|
if (m_parent.m_analyzing)
|
||||||
return bytes_consumed;
|
return bytes_consumed;
|
||||||
|
|
||||||
|
/* There can be multiple forward declarations of the same function.
|
||||||
|
Skip all but the first one. */
|
||||||
|
if (!is_definition && m_parent.function_decl (func_name) != NULL_TREE)
|
||||||
|
return bytes_consumed;
|
||||||
tree fndecl;
|
tree fndecl;
|
||||||
tree ret_value = NULL_TREE;
|
tree ret_value = NULL_TREE;
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue