From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 731623858D1E; Sat, 4 Mar 2023 12:02:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 731623858D1E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1677931363; bh=HKOmE1G+JMDIEfaGR3vyAui9ButmyV1g2faTA+Q5zfo=; h=From:To:Subject:Date:From; b=duL2s3g5HYI5T5u692FJQT7o3dBDTR3wTbFgMTfE++aG0fz0ynIBfGbEsCvjcw+Jw wIdRhLfLMCwqDvMzz5RQ2zrgeIHwZbgnWyxF3PfEWtGxL6BoIyHJALdXgBmQbQEJ/9 x0GCPz41ibf16D/x7Wpclu2oEjAaAExVSHt4e/m4= From: "muecker at gwdg dot de" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/109021] New: accept size parameter in extern C Date: Sat, 04 Mar 2023 12:02:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: unknown X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: muecker at gwdg dot de X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D109021 Bug ID: 109021 Summary: accept size parameter in extern C 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: --- A problem I encounter sometimes when using newer C headers in C++ is with functions that have array argument with a size parameter: extern "C" void foo(int N, char buf[N]); I think g++ should accept this in general or only for extern "C". At least for 1D arrays this should be easy as it could simply ignore the si= ze=20 and only emit a diagnostic with -pedantic.=