From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12603 invoked by alias); 31 Jan 2003 23:26:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 12596 invoked from network); 31 Jan 2003 23:26:47 -0000 Received: from unknown (HELO localhost.redhat.com) (172.16.49.200) by 172.16.49.205 with SMTP; 31 Jan 2003 23:26:47 -0000 Received: from redhat.com (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 432F03CA8; Fri, 31 Jan 2003 18:26:43 -0500 (EST) Message-ID: <3E3B0633.7040502@redhat.com> Date: Fri, 31 Jan 2003 23:26:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-US; rv:1.0.1) Gecko/20021211 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Andreas Schwab Cc: gdb-patches@sources.redhat.com Subject: Re: [patch/rfc] Eliminate char buf[MAX_REGISTER_RAW_SIZE] References: <3E3AFFA5.9080902@redhat.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2003-01/txt/msg00856.txt.bz2 > Andrew Cagney writes: > > |> Hello, > |> > |> Since MAX_REGISTER_RAW_SIZE is implemented using a function the declaration: > |> > |> char buf[MAX_REGISTER_RAW_SIZE]; > |> > |> is illegal. (GCC does allow it which is why no one notices :-/). > |> > |> The attached patch updates all obvious (as in found by a grep) occurances > |> of this and changes them to: > |> > |> char *buf = alloca (max_register_raw_size (current_gdbarch)); > > You have used max_register_size in the patch. Which of the two is > correct? Oops, max_register_size() is correct. (I've built all the cross targets). Hmm, I also forgot to mention that it hit both MAX_REGISTER_RAW_SIZE and MAX_REGISTER_VIRTUAL_SIZE. Andrew