public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/110920] New: variably-length array declarations as parameters for C compatibility
@ 2023-08-06 13:52 muecker at gwdg dot de
2023-08-06 13:58 ` [Bug c++/110920] " schwab@linux-m68k.org
0 siblings, 1 reply; 2+ messages in thread
From: muecker at gwdg dot de @ 2023-08-06 13:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110920
Bug ID: 110920
Summary: variably-length array declarations as parameters for C
compatibility
Product: gcc
Version: unknown
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
Assignee: unassigned at gcc dot gnu.org
Reporter: muecker at gwdg dot de
Target Milestone: ---
g++ rejects variably length arrays in parameters because C++ does not have
this. This is a problem when including some C headers.
extern "C" {
extern void foo(int A, double matrix[A]);
extern void bar(int A, int B, double[A][B]);
}
g++ could simply parse and then ignore the parameter as a language extension.
The first function 'foo' would then be directly usable form C++. For the second
function, there is no corresponding C++ type, but accepting this declaration in
headers would still allow the use of other functions. One could also consider
the possibility to allow calling this function from C++ code with a double*.
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/110920] variably-length array declarations as parameters for C compatibility
2023-08-06 13:52 [Bug c++/110920] New: variably-length array declarations as parameters for C compatibility muecker at gwdg dot de
@ 2023-08-06 13:58 ` schwab@linux-m68k.org
0 siblings, 0 replies; 2+ messages in thread
From: schwab@linux-m68k.org @ 2023-08-06 13:58 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110920
Andreas Schwab <schwab@linux-m68k.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #1 from Andreas Schwab <schwab@linux-m68k.org> ---
dup
*** This bug has been marked as a duplicate of bug 109021 ***
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-06 13:58 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-06 13:52 [Bug c++/110920] New: variably-length array declarations as parameters for C compatibility muecker at gwdg dot de
2023-08-06 13:58 ` [Bug c++/110920] " schwab@linux-m68k.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).