From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4510 invoked by alias); 2 Sep 2011 13:42:49 -0000 Received: (qmail 4500 invoked by uid 22791); 2 Sep 2011 13:42:48 -0000 X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 02 Sep 2011 13:42:34 +0000 Received: (qmail 24123 invoked from network); 2 Sep 2011 13:42:34 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Sep 2011 13:42:34 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.74) (envelope-from ) id 1QzU0u-0005MD-PH; Fri, 02 Sep 2011 13:42:32 +0000 Date: Fri, 02 Sep 2011 13:42:00 -0000 From: "Joseph S. Myers" To: Gary Funck cc: Gcc Patches Subject: Re: [Patch, C] options generation and language count In-Reply-To: <20110901214924.GA7377@intrepid.com> Message-ID: References: <20110829234640.GB26527@intrepid.com> <20110830160649.GM31092@intrepid.com> <20110901214924.GA7377@intrepid.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00158.txt.bz2 On Thu, 1 Sep 2011, Gary Funck wrote: > +# MAX_LANG is the maximum number of languages that can be defined. > +# Its value is extracted from the value of CL_PARAMS in opts.h > +# and is passed on the command line as '-v max_lang=...'. > +if (n_langs > max_lang) { > + print "Error: the number of defined languages (" n_langs ") " \ > + "exceeds the maximum supported by this implementation " \ > + "(" max_lang ")" > "/dev/stderr" > + exit 2 Are you sure this /dev/stderr reference is portable? I think this is trying to be too clever and you should just generate #if/#error in the output just like all the other error checks, and so not need to extract a value from a header with awk at all. -- Joseph S. Myers joseph@codesourcery.com