From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21806 invoked by alias); 1 May 2013 10:35:53 -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 21780 invoked by uid 48); 1 May 2013 10:35:50 -0000 From: "grpintar at gmail dot com" To: gcc-bugs@gcc.gnu.org Subject: [Bug c/57133] New: false const qualifier warning typedef Date: Wed, 01 May 2013 10:35:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: c X-Bugzilla-Keywords: X-Bugzilla-Severity: minor X-Bugzilla-Who: grpintar at gmail dot com X-Bugzilla-Status: UNCONFIRMED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 X-SW-Source: 2013-05/txt/msg00012.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57133 Bug #: 57133 Summary: false const qualifier warning typedef Classification: Unclassified Product: gcc Version: 4.8.0 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned@gcc.gnu.org ReportedBy: grpintar@gmail.com typedef char *type; void f(const type t) { } int main(void) { const char *str = "string"; f(str); return 0; } warning: passing argument 1 of 'f' discards 'const' qualifier from pointer target type [enabled by default] f(str); ^ note: expected 'type' but argument is of type 'const char *' void f(const type t) ^ It is similar with gcc 4.5.3.