public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/14057] New: error: conversion from `struct member*' to `enum PlayerNumber'
@ 2004-02-07  2:44 g_bugz at zewt dot org
  2004-02-07  2:47 ` [Bug c++/14057] " pinskia at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: g_bugz at zewt dot org @ 2004-02-07  2:44 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug c++/14057] error: conversion from `struct member*' to `enum PlayerNumber'
  2004-02-07  2:44 [Bug c++/14057] New: error: conversion from `struct member*' to `enum PlayerNumber' g_bugz at zewt dot org
@ 2004-02-07  2:47 ` pinskia at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-02-07  2:47 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-02-07 02:47 -------
This is a dup of bug 13696.

*** This bug has been marked as a duplicate of 13696 ***

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |DUPLICATE


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14057


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-07  2:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-07  2:44 [Bug c++/14057] New: error: conversion from `struct member*' to `enum PlayerNumber' g_bugz at zewt dot org
2004-02-07  2:47 ` [Bug c++/14057] " pinskia at gcc dot gnu dot 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).