From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 118279 invoked by alias); 26 May 2016 22:56:56 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 118264 invoked by uid 89); 26 May 2016 22:56:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:1243 X-HELO: relay1.mentorg.com Date: Thu, 26 May 2016 22:59:00 -0000 From: Joseph Myers To: "Paul E. Murphy" CC: Subject: Re: [PATCHv3 02/11] Refactor type specific macros using regexes In-Reply-To: Message-ID: References: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2016-05/txt/msg00637.txt.bz2 On Thu, 26 May 2016, Paul E. Murphy wrote: > Replace most of the type specific macros with the equivalent > type-generic macro using the following sed replacement command below: > > sed -ri -e 's/defined TEST_FLOAT/TEST_COND_binary32/' \ > -e 's/ndef TEST_FLOAT/ !TEST_COND_binary32/' \ > -e 's/def TEST_FLOAT/ TEST_COND_binary32/' \ > -e 's/defined TEST_DOUBLE/TEST_COND_binary64/'\ > -e 's/ndef TEST_DOUBLE/ !TEST_COND_binary64/' \ > -e 's/def TEST_DOUBLE/ TEST_COND_binary64/' \ > -e 's/defined TEST_LDOUBLE && //' \ > -e 's/ifdef TEST_LDOUBLE/if MANT_DIG >= 64/' \ > -e 's/defined TEST_LDOUBLE/MANT_DIG >= 64/' \ > -e '/nexttoward_test_data\[\]/,/ };/!s/LDBL_(MIN_EXP|MAX_EXP|MANT_DIG)/\1/g' \ > libm-test.inc > > With a little extra manual cleanup to simplify the following case: > > #if MANT_DIG >= 64 > # if MANT_DIG >= 64 > ... > # endif > ... > > Note, TEST_LDOUBLE checks are replaced by MANT_DIG >= 64 excepting > where another property of the type is being tested. And, the final > regex is intended to avoid replacing LDBL_ macro usage within the > nexttoward tests which explicitly take argument 2 as long double. OK. -- Joseph S. Myers joseph@codesourcery.com