public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "g_bugz at zewt dot org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug c++/14057] New: error: conversion from `struct member*' to `enum PlayerNumber' Date: Sat, 07 Feb 2004 02:44:00 -0000 [thread overview] Message-ID: <20040207024422.14057.g_bugz@zewt.org> (raw) Source: --- enum { TRACK_1, TRACK_2, TRACK_3, TRACK_4, TRACK_5 }; enum PlayerNumber { PLAYER_1, PLAYER_2 }; struct member { int x; }; struct x { member Member[2]; }; void foo() { x Foo[2]; PlayerNumber pn = PLAYER_1; int c=0; member Button = Foo[pn].Member[c]; } --- That's as reduced as I could get it; it goes away if I replace pn or c in the last line with their values, use a scalar instead of "member", change pn to an int, etc. g++ -v -save-temps test.cc -c -Wall -W Reading specs from /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/specs Configured with: ../configure --prefix=/usr/local Thread model: posix gcc version 3.4.0 20040206 (prerelease) /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -E -quiet -v - D_GNU_SOURCE test.cc -mtune=pentiumpro -Wall -W -o test.ii ignoring nonexistent directory "/usr/local/lib/gcc/i686-pc-linux- gnu/3.4.0/../../../../i686-pc-linux-gnu/include" #include "..." search starts here: #include <...> search starts here: /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0 /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/../../../../include/c++/3.4.0/i686- pc-linux-gnu /usr/local/lib/gcc/i686-pc-linux- gnu/3.4.0/../../../../include/c++/3.4.0/backward /usr/local/include /usr/local/lib/gcc/i686-pc-linux-gnu/3.4.0/include /usr/include End of search list. /usr/local/libexec/gcc/i686-pc-linux-gnu/3.4.0/cc1plus -fpreprocessed test.ii - quiet -dumpbase test.cc -mtune=pentiumpro -auxbase test -Wall -W -version -o test.s GNU C++ version 3.4.0 20040206 (prerelease) (i686-pc-linux-gnu) compiled by GNU C version 3.3.3 20040125 (prerelease) (Debian). GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=31849 test.cc: In function `void foo()': test.cc:31: error: conversion from `struct member*' to `enum PlayerNumber' test.cc:31: error: conversion from `struct member*' to `enum PlayerNumber' -- Summary: error: conversion from `struct member*' to `enum PlayerNumber' Product: gcc Version: 3.4.0 Status: UNCONFIRMED Severity: normal Priority: P2 Component: c++ AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: g_bugz at zewt dot org CC: gcc-bugs at gcc dot gnu dot org GCC build triplet: i686-pc-linux-gn GCC host triplet: i686-pc-linux-gn GCC target triplet: i686-pc-linux-gn http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14057
next reply other threads:[~2004-02-07 2:44 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2004-02-07 2:44 g_bugz at zewt dot org [this message] 2004-02-07 2:47 ` [Bug c++/14057] " pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20040207024422.14057.g_bugz@zewt.org \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).