From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29835 invoked by alias); 29 Jul 2008 14:50:44 -0000 Received: (qmail 29820 invoked by uid 22791); 29 Jul 2008 14:50:42 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.33.17) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 29 Jul 2008 14:50:21 +0000 Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id m6TEo8dd005456; Tue, 29 Jul 2008 15:50:09 +0100 Received: from smtp.corp.google.com (spacemonkey2.corp.google.com [192.168.120.114]) by wpaz21.hot.corp.google.com with ESMTP id m6TEo6uG019728 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 29 Jul 2008 07:50:07 -0700 Received: from localhost.localdomain.google.com (69-36-227-135.cust.layer42.net [69.36.227.135] (may be forged)) (authenticated bits=0) by smtp.corp.google.com (8.13.8/8.13.8) with ESMTP id m6TEo3t8014273 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 29 Jul 2008 07:50:05 -0700 To: "Aaron W. LaFramboise" Cc: "Kaveh R. GHAZI" , gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix const pointer warning in gthr-win32.h References: <48768624.4090608@aaronwl.com> <488E281F.6080507@aaronwl.com> From: Ian Lance Taylor Date: Tue, 29 Jul 2008 17:21:00 -0000 In-Reply-To: <488E281F.6080507@aaronwl.com> (Aaron W. LaFramboise's message of "Mon\, 28 Jul 2008 15\:12\:15 -0500") Message-ID: User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes 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: 2008-07/txt/msg02277.txt.bz2 "Aaron W. LaFramboise" writes: > OK, I discovered this file is also used in other places outside of GCC > such as in libgfortran, so using tsystem.h is not OK there. What is > the proper way to make this error go away then, as I understand the > union trick is the only way to silence it? > > > By the way, I think this prototype is actually incorrect. The ptr > parameter really should not be const, because __gthread_getspecific > returns a non-const void *. However, I'm not sure if there's some > other reason this should be const; does anyone know about this? What code are you compiling when you see this warning? As far as I know code that uses gthr-win32.h is mostly C code which should be compiled with -Wc++-compat. Ian