From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31785 invoked by alias); 12 Jul 2014 16:00:51 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 31748 invoked by uid 48); 12 Jul 2014 16:00:48 -0000 From: "paolo.carlini at oracle dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/51352] g++ can't pass variable-length array as a function argument Date: Sat, 12 Jul 2014 16:00:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c++ X-Bugzilla-Version: 4.6.1 X-Bugzilla-Keywords: rejects-valid X-Bugzilla-Severity: normal X-Bugzilla-Who: paolo.carlini at oracle dot com X-Bugzilla-Status: NEW 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: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-07/txt/msg00763.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51352 --- Comment #5 from Paolo Carlini --- We have this comment in cp_parser_direct_declarator: /* Normally, the array bound must be an integral constant expression. However, as an extension, we allow VLAs in function scopes as long as they aren't part of a parameter declaration. */ cp_parser_error (parser, "array bound is not an integer constant"); thus the limitation is well known (to the author of the parser at least ;)