This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13696] New: [3.4] enum not useable as array index?
- From: "marcus at jet dot franken dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 15 Jan 2004 10:50:01 -0000
- Subject: [Bug c++/13696] New: [3.4] enum not useable as array index?
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
Compiling the attached testcase with:
g++ fl_color.ii
gives:
fl_color.ii:12: error: conversion from `struct s*' to `enum e'
It should probably work, if I refactor it to:
unsigned long l = map[i][j].l;
x(&l);
it works.
--
Summary: [3.4] enum not useable as array index?
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: marcus at jet dot franken dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: x86_64-suse-linux
GCC host triplet: x86_64-suse-linux
GCC target triplet: x86_64-suse-linux
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13696