From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100982 invoked by alias); 5 Apr 2017 15:13:11 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 100966 invoked by uid 89); 5 Apr 2017 15:13:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy= X-HELO: mail-wr0-f176.google.com Received: from mail-wr0-f176.google.com (HELO mail-wr0-f176.google.com) (209.85.128.176) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 05 Apr 2017 15:13:09 +0000 Received: by mail-wr0-f176.google.com with SMTP id w43so18268304wrb.0 for ; Wed, 05 Apr 2017 08:13:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=UJS++StQPc+zCBOGHSPDvxKp6qAUHNvg+BoE+vaSaGk=; b=IjTQQMlHBggyrDHVq3LrZJvF/GIqVTQcTIhbbKPTpwCFHrPPbevsMRLAuGeI2ByEAy E9jceki8uZN+IkjlXNY+Wil/e4dQiheKsY0+Dn7oqUAXNZ73Joyu1UjC5vMgnhseDtQt piq21J7exdiV38Myg5FnE7IXv3s03q1X3D0ZCTTyegHJtHOdlclM7Lf7jAk04Y8cbvpS vODMBg1/AoLQaN1wdkYaqyRHtPp7YML5ncQlN+gTk0HXmobo1VMatxvfNhUtTPRfHUZ5 DsdHiDqcAB89xjBamJV4sxCLp0SSFfAJmyK+PjpYOAM/U6s5F/W9R4xyziHVLlvnNTGn ZMRw== X-Gm-Message-State: AFeK/H3iisX/uWMtOG4fhRrkY/83+Bqs2lx8Tv6t08ZysJTeHBZzHOVYsbcVLFI09amQzUg6 X-Received: by 10.223.134.173 with SMTP id 42mr27450140wrx.130.1491405188693; Wed, 05 Apr 2017 08:13:08 -0700 (PDT) Received: from [192.168.0.100] ([37.189.166.198]) by smtp.gmail.com with ESMTPSA id r5sm7432446wra.50.2017.04.05.08.13.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 05 Apr 2017 08:13:07 -0700 (PDT) Subject: Re: [PATCH 4/5] Make sect_offset and cu_offset strong typedefs instead of structs To: Simon Marchi References: <1490754298-9455-1-git-send-email-palves@redhat.com> <1490754298-9455-5-git-send-email-palves@redhat.com> Cc: gdb-patches@sourceware.org From: Pedro Alves Message-ID: <30bf01d6-31dc-c884-055a-f7c675e17d62@redhat.com> Date: Wed, 05 Apr 2017 15:13:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2017-04/txt/msg00110.txt.bz2 On 03/29/2017 04:46 PM, Simon Marchi wrote: > A while ago (in the pre C++ era), I asked you if we could make some > integer types that couldn't be assigned to each other, to represent > 8-bit bytes and target bytes. That would help avoid mixing incompatible > lengths or offsets for targets that have 16 or 32 bit bytes, forcing us > to do the appropriate conversion. There was no way to do it in C. Do > you think offset-type could be used for that now? Indeed, that might work. Thanks, Pedro Alves