From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1320 invoked by alias); 26 Sep 2011 00:40:34 -0000 Received: (qmail 1311 invoked by uid 22791); 26 Sep 2011 00:40:32 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from lo.gmane.org (HELO lo.gmane.org) (80.91.229.12) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 26 Sep 2011 00:40:07 +0000 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1R7zEs-0001uP-BJ for gcc@gcc.gnu.org; Mon, 26 Sep 2011 02:40:06 +0200 Received: from 61.245.23.167.eo.eaccess.ne.jp ([61.245.23.167]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Sep 2011 02:40:06 +0200 Received: from miles by 61.245.23.167.eo.eaccess.ne.jp with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 26 Sep 2011 02:40:06 +0200 To: gcc@gcc.gnu.org From: Miles Bader Subject: Re: Volatile qualification on pointer and data Date: Mon, 26 Sep 2011 07:14:00 -0000 Message-ID: <87k48wxhnq.fsf@catnip.gol.com> References: <4E7A3209.10508@gjlay.de> <4E7DFB31.9010906@westcontrol.com> <4E7F4575.1030308@gmail.com> <4E7F57E2.7000204@hesbynett.no> Mime-Version: 1.0 Content-Type: text/plain System-Type: x86_64-unknown-linux-gnu X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2011-09/txt/msg00300.txt.bz2 David Brown writes: > So what advantages would there be in declaring a volatile buffer like > this to be "const"? At best, you are helping the compiler check that > you don't accidentally write to it in your own code. That's actually pretty handy tho... -Miles -- Everywhere is walking distance if you have the time. -- Steven Wright