From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11917 invoked by alias); 31 Oct 2004 14:52:46 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 11899 invoked from network); 31 Oct 2004 14:52:45 -0000 Received: from unknown (HELO smtp806.mail.ukl.yahoo.com) (217.12.12.196) by sourceware.org with SMTP; 31 Oct 2004 14:52:45 -0000 Received: from unknown (HELO ?192.168.0.2?) (graham.stott@81.152.223.135 with plain) by smtp806.mail.ukl.yahoo.com with SMTP; 31 Oct 2004 14:52:44 -0000 Message-ID: <4184FC3B.2040407@btinternet.com> Date: Sun, 31 Oct 2004 14:52:00 -0000 From: Graham Stott User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.3) Gecko/20040922 MIME-Version: 1.0 To: gcc-bugzilla@gcc.gnu.org CC: gcc-bugs@gcc.gnu.org Subject: Re: [Bug fortran/17590] Standard conformance should take intrinsics into account. References: <20040921183311.17590.jblomqvi@cc.hut.fi> <20041031134738.3459.qmail@sourceware.org> In-Reply-To: <20041031134738.3459.qmail@sourceware.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004-10/txt/msg03923.txt.bz2 List-Id: All, FWIW here's a quick patch which fixes bootstrap problem for me on i686-pc-linux-gnu. I've got to go out the door in 5 mins do with as you see fit. Graham ---------------------------------------------------------------------------------------- Index: intrinsic.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/fortran/intrinsic.c,v retrieving revision 1.27 diff -c -p -r1.27 intrinsic.c *** intrinsic.c 31 Oct 2004 01:24:29 -0000 1.27 --- intrinsic.c 31 Oct 2004 14:46:19 -0000 *************** gfc_init_expr_extensions (gfc_intrinsic_ *** 2672,2687 **** static void check_intrinsic_standard (const char *name, int standard) { ! int name_len; ! char msgstr[name_len + 53]; ! ! if (!gfc_option.warn_nonstd_intrinsics) ! return; ! ! name_len = strlen (name); ! strncpy (msgstr, name, name_len + 1); ! strncat (msgstr, " intrinsic is not included in the selected standard.", 53); ! gfc_notify_std (standard, msgstr); } --- 2671,2688 ---- static void check_intrinsic_standard (const char *name, int standard) { ! if (gfc_option.warn_nonstd_intrinsics) ! { ! static const char err[] = " intrinsic is not included in the selected standard."; ! size_t err_len = sizeof (err); ! size_t name_len = strlen (name); ! char *msgstr = gfc_getmem (name_len + err_len); ! ! memcpy (msgstr, name, name_len); ! memcpy (&msgstr[name_len], err, err_len); ! gfc_notify_std (standard, msgstr); ! gfc_free (msgstr); ! } } ----------------------------------------------------------------------------------------