public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug c/45584] New: typeof with casting from const to non-const does not work properly @ 2010-09-07 16:52 radoslaw dot biernacki at gmail dot com 2010-09-08 9:38 ` [Bug c/45584] " rguenth at gcc dot gnu dot org 0 siblings, 1 reply; 4+ messages in thread From: radoslaw dot biernacki at gmail dot com @ 2010-09-07 16:52 UTC (permalink / raw) To: gcc-bugs [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain, Size: 981 bytes --] typeof() does not property recognizes the non-const type, which was casted from const type: $ cat plik.c #include <stdio.h> int main() { const unsigned long val; typeof( ((unsigned long)(val)) ) val2; val2 = 0; //compilation error } $ gcc -o plik plik.c plik.c: In function âmainâ: plik.c:7: error: assignment of read-only variable âval2â $ gcc --version gcc (GCC) 4.4.3 20100127 (Red Hat 4.4.3-4) ... -- Summary: typeof with casting from const to non-const does not work properly Product: gcc Version: 4.4.3 Status: UNCONFIRMED Severity: minor Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: radoslaw dot biernacki at gmail dot com GCC build triplet: 4.4.3 20100127 (Red Hat 4.4.3-4) GCC host triplet: Linux TVBuildAlfa 2.6.32.12-115.fc12.i686.PAE #1 SMP http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45584 ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/45584] typeof with casting from const to non-const does not work properly 2010-09-07 16:52 [Bug c/45584] New: typeof with casting from const to non-const does not work properly radoslaw dot biernacki at gmail dot com @ 2010-09-08 9:38 ` rguenth at gcc dot gnu dot org 0 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu dot org @ 2010-09-08 9:38 UTC (permalink / raw) To: gcc-bugs ------- Comment #1 from rguenth at gcc dot gnu dot org 2010-09-08 09:37 ------- Confirmed. -- rguenth at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last reconfirmed|0000-00-00 00:00:00 |2010-09-08 09:37:55 date| | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=45584 ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <bug-45584-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c/45584] typeof with casting from const to non-const does not work properly [not found] <bug-45584-4@http.gcc.gnu.org/bugzilla/> @ 2014-08-19 14:15 ` ppalka at gcc dot gnu.org 2014-08-19 17:12 ` mpolacek at gcc dot gnu.org 1 sibling, 0 replies; 4+ messages in thread From: ppalka at gcc dot gnu.org @ 2014-08-19 14:15 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45584 --- Comment #2 from ppalka at gcc dot gnu.org --- Author: ppalka Date: Tue Aug 19 14:14:15 2014 New Revision: 214151 URL: https://gcc.gnu.org/viewcvs?rev=214151&root=gcc&view=rev Log: 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org> PR c/45584 * c-typeck.c (build_c_cast): Do a conversion even when the TYPE_MAIN_VARIANTs are the same. 2014-08-19 Patrick Palka <ppalka@gcc.gnu.org> PR c/45584 * gcc.dg/pr13519-1.c: Adjust. Modified: trunk/gcc/c/ChangeLog trunk/gcc/c/c-typeck.c trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.dg/pr13519-1.c ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug c/45584] typeof with casting from const to non-const does not work properly [not found] <bug-45584-4@http.gcc.gnu.org/bugzilla/> 2014-08-19 14:15 ` ppalka at gcc dot gnu.org @ 2014-08-19 17:12 ` mpolacek at gcc dot gnu.org 1 sibling, 0 replies; 4+ messages in thread From: mpolacek at gcc dot gnu.org @ 2014-08-19 17:12 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=45584 Marek Polacek <mpolacek at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |mpolacek at gcc dot gnu.org Resolution|--- |FIXED Target Milestone|--- |5.0 --- Comment #3 from Marek Polacek <mpolacek at gcc dot gnu.org> --- Should be fixed now. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-08-19 17:12 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-09-07 16:52 [Bug c/45584] New: typeof with casting from const to non-const does not work properly radoslaw dot biernacki at gmail dot com 2010-09-08 9:38 ` [Bug c/45584] " rguenth at gcc dot gnu dot org [not found] <bug-45584-4@http.gcc.gnu.org/bugzilla/> 2014-08-19 14:15 ` ppalka at gcc dot gnu.org 2014-08-19 17:12 ` mpolacek at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).