From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 113106 invoked by alias); 18 May 2015 16:05:03 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 113055 invoked by uid 48); 18 May 2015 16:05:00 -0000 From: "kevin at koconnor dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug middle-end/66110] uint8_t memory access not optimized Date: Mon, 18 May 2015 16:05:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: middle-end X-Bugzilla-Version: 5.1.0 X-Bugzilla-Keywords: alias, missed-optimization X-Bugzilla-Severity: normal X-Bugzilla-Who: kevin at koconnor dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Resolution: FIXED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: 6.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-05/txt/msg01391.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66110 --- Comment #12 from Kevin OConnor --- (In reply to Andreas Schwab from comment #11) > Since typedef does not create a new type the effect of uint8_t is exactly > the same as the type it is defined from. Thus if uint8_t is defined from > unsigned char then uint8_t is a character type. Yes, of course. My point is that gcc does not need to define uint8_t / __UINT8_TYPE__ as 'unsigned char'. Instead it could define it as a new integer type (eg, __gcc_uint8_t) that is an 8-bit integer that does not alias. As before, I understand if the cost of doing this is too high, but it's unfortunate that there currently does not appear to be any way to define a pointer to an 8-bit integer that doesn't alias.