From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37805 invoked by alias); 3 Feb 2018 06:43:30 -0000 Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org Received: (qmail 37787 invoked by uid 89); 3 Feb 2018 06:43:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=3.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2 spammy=H*f:sk:e9442bb, gmt08, GMT08, GMT-08 X-HELO: mail-wr0-f177.google.com Received: from mail-wr0-f177.google.com (HELO mail-wr0-f177.google.com) (209.85.128.177) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 03 Feb 2018 06:43:27 +0000 Received: by mail-wr0-f177.google.com with SMTP id s5so24633762wra.0 for ; Fri, 02 Feb 2018 22:43:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=jTZKRU26+kv+nOYWJLtOy6oQBiUiXftXmnG4hzmrxIc=; b=k8fFKSe5DU3+Ql6K7xiEEb+60GVlE4doogdJZAXYQ41idGG1nggmLcrc4H03g1Vw3O kUWOAqZJuPWkz1FGcU+Z5ymO0P9GDMm/e/cZHwgORazJmVIguJevlUL4KDNp/HCe1RNC XMbaZ2Vek5PAUhOqCpdJ1bpr+FfRXzFHvaK2T/ONEXqjpAoeYczb3xD3RTfzHjqZK5uB Mhd0F+BUx0MXNtY2Kiex6XZ+UU9LXZuPkt9SeiKi4BElOmaN2fJbuWhNHkRcgz85Ou/2 LO+EfFP5XFFrR3vxj0OVIbxvqppTttAWfNj5TaAQ/B7nD8CPGvJsZ/p+OjWWVmq5X7mI 81PA== X-Gm-Message-State: AKwxytfhLelsZ13BgpYBNf8OlV6duh3WRgsZ/Tu5PkOEutHDijqVZtVQ y4rcBknqs95wU+cRzXKHBGDDVo7IJJiRA+yt1QKlQg== X-Google-Smtp-Source: AH8x2246uQR8RkNNxl5DTSOa0nVO6/j8RdjGwIHbrfsbh48XhWTJIGQCG+PFhKOU3oNlER9x8sB64bS2LCKs46onKXo= X-Received: by 10.223.176.174 with SMTP id i43mr22348747wra.77.1517640204711; Fri, 02 Feb 2018 22:43:24 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.122.19 with HTTP; Fri, 2 Feb 2018 22:43:24 -0800 (PST) In-Reply-To: References: From: Roman Popov Date: Sat, 03 Feb 2018 06:43:00 -0000 Message-ID: Subject: Re: gdb 8.x - g++ 7.x compatibility To: Simon Marchi , gdb@sourceware.org, gcc@gcc.gnu.org Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00012.txt.bz2 2018-02-02 20:54 GMT-08:00 Simon Marchi : > > GCC changed how it outputs unsigned template parameters in the debug info > (from 2u to just 2), and it doesn't look like it's going to change it > back. So I suppose we'll have to find a way to make GDB deal with it. > Simon > I'm not so sure about it. In my opinion it is a gcc bug. 2u and 2 are literals of different types. But I'm not a C++ expert. It looks like g++ and clang treat C++ language differently in this case. I've asked on stackoverflow: https://stackoverflow.com/questions/48594693/auto-template-parameters-g-7-3-vs-clang-6-0-which-compiler-is-correct If Clang is correct here, than foo<1u> and foo<1> are two different types. And so gcc should emit correct postfixes to debuginfo. -Roman