From owner-svn-src-head@FreeBSD.ORG Sun Nov 25 05:13:30 2012 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1D1502A5 for ; Sun, 25 Nov 2012 05:13:30 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 798D68FC16 for ; Sun, 25 Nov 2012 05:13:28 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id j13so9693412lah.13 for ; Sat, 24 Nov 2012 21:13:28 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:disposition-notification-to:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to:openpgp :content-type:content-transfer-encoding:x-gm-message-state; bh=Zj8Wd0LXkNNA4ro54XWMIxChI5KonKAWC47YM5bn4Bc=; b=f2oXP8H9MuBz7LSDV3fmCeEhZx0Coqf1g4MEIhPi3RehAoHIT/2Gsu/ZMBIS9WR4kY 3DYgakdLoLlfHxeJVwR4hdEENa85Jr4TlTHC1CTso47MnCjKmgx1+26suTVKbvRsSx4T tD20EGeoRX/ksypfScklzmLJ3TSQ1PLqJSB+iOHSPCVVvu3/WfCSf/GSuTYQzFxFES23 J8xp8lbgRUNqvmv7VK9GzTDh4jbZd4bxY6X8sdvWxIwHITazDI0I2iE4BBZSEE3k1+ll Ak4TRe43suCpsE1y6b/pEx4Z/xYq8wZxEh/7dAIBS1kMd0be9bGK8juq/PxCRHVZ+jdk Q5yQ== Received: by 10.112.48.40 with SMTP id i8mr3533254lbn.97.1353820407954; Sat, 24 Nov 2012 21:13:27 -0800 (PST) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPS id sj3sm3915623lab.2.2012.11.24.21.13.27 (version=SSLv3 cipher=OTHER); Sat, 24 Nov 2012 21:13:27 -0800 (PST) Message-ID: <50B1A8F8.9090302@freebsd.org> Date: Sun, 25 Nov 2012 09:13:28 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: svn commit: r243474 - head/usr.bin/cut References: <201211240415.qAO4FPaG062952@svn.freebsd.org> <50B07EB6.3010503@freebsd.org> <50B0D5B3.9000802@FreeBSD.org> <50B0DF04.5060001@freebsd.org> In-Reply-To: <50B0DF04.5060001@freebsd.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQljIMjxQOqYsgMtY06lW/cm0uR8s28Xn7watu6s5c1RVGcVkx2Wk9gXJ3RZBGWiU/47/sze Cc: Andrew Turner , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 25 Nov 2012 05:13:30 -0000 On 24.11.2012 18:51, Andrey Chernov wrote: > On 24.11.2012 18:12, Dimitry Andric wrote: >>>> -is_delim(int ch) >>>> +is_delim(wchar_t ch) >>>> { >>>> if (wflag) { >>>> if (ch == ' ' || ch == '\t') >>>> >>> >>> I can't look at the whole code at this moment, but taking standalone >>> this is incorrect comparison for wchar_t. Should be L' ' and L'\t' >>> instead. >> >> The compiler just promotes the space and tab to wchar_t, this is only >> needed for the sake of consistency (and/or style). There is no binary >> change if you add the L prefixes. :) > > In general case byte order of type promotion is not necessary equal to > byte order of L'x' literals. > Forget to note that this point "The compiler just promotes the space and tab to wchar_t" is wrong. Since there are no direct (wchar_t) cast, compiler promotes both to the nearby integer type.