This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Problem with use of anonymous types
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: "Julian Cummings" <cummings at cacr dot caltech dot edu>
- Cc: "'Andrew Pinski'" <pinskia at physics dot uc dot edu>, <gcc-bugs at gcc dot gnu dot org>, <mark at codesourcery dot com>
- Date: 08 May 2005 00:40:07 +0200
- Subject: Re: Problem with use of anonymous types
- References: <200505070114.j471EoQn022018@mail.cacr.caltech.edu>
"Julian Cummings" <cummings@cacr.caltech.edu> writes:
| Hmmm... I just read through the bug reports you cited. Sounds to me like
| this is still somewhat of an open issue, as to whether the compiler should
| issue an error in these cases or simply silently discard any templated
| function as a possible match for an operation involving an unnamed type. As
You're right, the issue is still open. I think people should be
careful in closing PRs related to that issue.
I can see the reasoning behind the error but it does not make any
sense to me.
| was pointed out in the discussion, this is a *disastrous* change in the
| standard behavior of gcc because it essentially makes it impossible to
| safely use an unnamed enum type in an arithmetic operation. There is bound
| to be some template function overload declared in some header file somewhere
| that suddenly makes your code not work. I am shocked that there is no
| compiler flag made available to restore the previous behavior, especially in
| light of the fact that the disposition of this issue remains unresolved. I
Please consider filling a PR and expliclty mention the fact that the
issue is under discussion withing the C++ committee.
| have checked several other C++ compilers now (Intel icc 8.1 and IBM xlC 7.0,
| for instance) and they all accept my example.
-- Gaby