]> gcc.gnu.org Git - gcc.git/commit
c: error for function with external and internal linkage [PR111708]
authorMartin Uecker <uecker@tugraz.at>
Sat, 14 Oct 2023 07:09:07 +0000 (09:09 +0200)
committerMartin Uecker <uecker@tugraz.at>
Tue, 17 Oct 2023 18:19:12 +0000 (20:19 +0200)
commit1f186f64b8602d74769af4a6250255e51227f744
tree104d609b11947646efcf8d66e0734b2027448d6a
parent5ac63ec5da2e93226457bea4dbb3a4f78d5d82c2
c: error for function with external and internal linkage [PR111708]

Declaring a function with both external and internal linkage
in the same TU is translation-time UB.  Add an error for this
case as already done for objects.

PR c/111708

gcc/c/ChangeLog:

* c-decl.cc (grokdeclarator): Add error.

gcc/testsuite/ChangeLog:

* gcc.dg/pr111708-1.c: New test.
* gcc.dg/pr111708-2.c: New test.
gcc/c/c-decl.cc
gcc/testsuite/gcc.dg/pr111708-1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/pr111708-2.c [new file with mode: 0644]
This page took 0.06555 seconds and 5 git commands to generate.