public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12667] New: max(enum) returns reference to temporary
@ 2003-10-18 0:15 mdorey at bluearc dot com
2003-10-18 0:46 ` [Bug c++/12667] " pinskia at gcc dot gnu dot org
` (10 more replies)
0 siblings, 11 replies; 12+ messages in thread
From: mdorey at bluearc dot com @ 2003-10-18 0:15 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
Summary: max(enum) returns reference to temporary
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: mdorey at bluearc dot com
CC: gcc-bugs at gcc dot gnu dot org
I think that max1() and max2() are both legal and should generate equivalent,
legal code:
enum E {
E1, E2
};
const E& max1(const E& a, const E& b) {
bool c = a < b;
return c ? b : a;
}
const E& max2(const E& a, const E& b) {
return a < b ? b : a;
}
max2(), however, provokes a warning:
max-enum.cpp: In function `const E& max2(const E&, const E&)':
max-enum.cpp:9: warning: returning reference to temporary
And, worse, the warning's accurate in that, I think, incorrect code is
generated. I'm a PowerPC weenie at the moment, so this is the clearest
demonstration of the problem in my eyes (3.3.1 sadly):
trevithick:~/playpen$ powerpc-eabi-g++ -W -Wall -pedantic -v -O2 -c max-
enum.cpp
Reading specs from /usr/local/lib/gcc-lib/powerpc-eabi/3.3.1/specs
Configured with: ../gcc-3.3.1/configure --target=powerpc-eabi --with-newlib --
with-local-prefix=/usr/local/powerpc-eabi --enable-languages=c,c++ --enable-cxx-
flags=-fno-exceptions
Thread model: single
gcc version 3.3.1
/usr/local/lib/gcc-lib/powerpc-eabi/3.3.1/cc1plus -quiet -v -D__GNUC__=3 -
D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 max-enum.cpp -D__GNUG__=3 -quiet -
dumpbase max-enum.cpp -auxbase max-enum -O2 -W -Wall -pedantic -version -
o /tmp/cchuQIuU.s
GNU C++ version 3.3.1 (powerpc-eabi)
compiled by GNU C version 3.3.1 (Debian).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=129171
ignoring nonexistent directory "NONE/include"
ignoring nonexistent directory "/usr/local/powerpc-eabi/sys-include"
ignoring nonexistent directory "/usr/local/powerpc-eabi/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/local/include/c++/3.3.1
/usr/local/include/c++/3.3.1/powerpc-eabi
/usr/local/include/c++/3.3.1/backward
/usr/local/lib/gcc-lib/powerpc-eabi/3.3.1/include
End of search list.
max-enum.cpp: In function `const E& max2(const E&, const E&)':
max-enum.cpp:9: warning: returning reference to temporary
/usr/local/lib/gcc-lib/powerpc-eabi/3.3.1/../../../../powerpc-eabi/bin/as -
mppc -V -Qy -o max-enum.o /tmp/cchuQIuU.s
GNU assembler version 2.14 (powerpc-eabi) using BFD version 2.14 20030612
trevithick:~/playpen$ powerpc-eabi-objdump --disassemble max-enum.o
max-enum.o: file format elf32-powerpc
Disassembly of section .text:
00000000 <_Z4max1RK1ES1_>:
0: 81 23 00 00 lwz r9,0(r3)
4: 7c 6b 1b 78 mr r11,r3
8: 80 04 00 00 lwz r0,0(r4)
c: 7c 83 23 78 mr r3,r4
10: 7c 09 00 00 cmpw r9,r0
14: 4d 80 00 20 bltlr
18: 7d 63 5b 78 mr r3,r11
1c: 4e 80 00 20 blr
00000020 <_Z4max2RK1ES1_>:
20: 94 21 ff f0 stwu r1,-16(r1)
24: 38 61 00 08 addi r3,r1,8
28: 38 21 00 10 addi r1,r1,16
2c: 4e 80 00 20 blr
trevithick:~/playpen$
But the problem is also exhibited in the unoptimised build (I can follow-up
with the disassembly if you like) and in 3.3.2 Intel builds:
trevithick:~/playpen$ g++ -W -Wall -pedantic -v -O2 -c max-enum.cpp
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Configured with: ../src/configure -v --enable-
languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --
mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-
dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --
without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-
debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.2 20031005 (Debian prerelease)
/usr/lib/gcc-lib/i486-linux/3.3.2/cc1plus -quiet -v -D__GNUC__=3 -
D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D_GNU_SOURCE max-enum.cpp -
D__GNUG__=3 -quiet -dumpbase max-enum.cpp -auxbase max-enum -O2 -W -Wall -
pedantic -version -o /tmp/ccyKxhqp.s
GNU C++ version 3.3.2 20031005 (Debian prerelease) (i486-linux)
compiled by GNU C version 3.3.2 20031005 (Debian prerelease).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=129171
ignoring nonexistent directory "/usr/i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.3
/usr/include/c++/3.3/i486-linux
/usr/include/c++/3.3/backward
/usr/local/include
/usr/lib/gcc-lib/i486-linux/3.3.2/include
/usr/include
End of search list.
max-enum.cpp: In function `const E& max2(const E&, const E&)':
max-enum.cpp:9: warning: returning reference to temporary
as -V -Qy -o max-enum.o /tmp/ccyKxhqp.s
GNU assembler version 2.14.90.0.6 (i386-linux) using BFD version 2.14.90.0.6
20030820 Debian GNU/Linux
trevithick:~/playpen$ objdump --disassemble max-enum.o
max-enum.o: file format elf32-i386
Disassembly of section .text:
00000000 <_Z4max1RK1ES1_>:
0: 55 push %ebp
1: 89 e5 mov %esp,%ebp
3: 8b 55 0c mov 0xc(%ebp),%edx
6: 8b 4d 08 mov 0x8(%ebp),%ecx
9: 8b 02 mov (%edx),%eax
b: 39 01 cmp %eax,(%ecx)
d: 7d 04 jge 13 <_Z4max1RK1ES1_+0x13>
f: 89 d0 mov %edx,%eax
11: 5d pop %ebp
12: c3 ret
13: 89 c8 mov %ecx,%eax
15: eb fa jmp 11 <_Z4max1RK1ES1_+0x11>
17: 90 nop
18: 90 nop
19: 8d b4 26 00 00 00 00 lea 0x0(%esi,1),%esi
00000020 <_Z4max2RK1ES1_>:
20: 55 push %ebp
21: 89 e5 mov %esp,%ebp
23: 83 ec 04 sub $0x4,%esp
26: 89 ec mov %ebp,%esp
28: 8d 45 fc lea 0xfffffffc(%ebp),%eax
2b: 5d pop %ebp
2c: c3 ret
2d: 90 nop
2e: 89 f6 mov %esi,%esi
trevithick:~/playpen$
The problem doesn't happen if E is typedef()d to be int.
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
@ 2003-10-18 0:46 ` pinskia at gcc dot gnu dot org
2003-11-15 11:31 ` [Bug c++/12667] [3.3 regression] " pinskia at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-18 0:46 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-18 00:15 -------
Fixed on the mainline, 3.4: Search converges between 2003-09-16-trunk (#403) and 2003-09
-17-trunk (#404).
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
2003-10-18 0:46 ` [Bug c++/12667] " pinskia at gcc dot gnu dot org
@ 2003-11-15 11:31 ` pinskia at gcc dot gnu dot org
2003-11-15 14:07 ` mdorey at bluearc dot com
` (8 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-15 11:31 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-15 11:31 -------
In 3.0.4 and before the code was right and included the compare so that is a regression
but since I do not know if the code invokes undefined behavior, I am not confirming this
one.
--
What |Removed |Added
----------------------------------------------------------------------------
Keywords| |pessimizes-code, wrong-code
Summary|max(enum) returns reference |[3.3 regression] max(enum)
|to temporary |returns reference to
| |temporary
Target Milestone|--- |3.3.3
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
2003-10-18 0:46 ` [Bug c++/12667] " pinskia at gcc dot gnu dot org
2003-11-15 11:31 ` [Bug c++/12667] [3.3 regression] " pinskia at gcc dot gnu dot org
@ 2003-11-15 14:07 ` mdorey at bluearc dot com
2003-11-16 17:47 ` bangerth at dealii dot org
` (7 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mdorey at bluearc dot com @ 2003-11-15 14:07 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mdorey at bluearc dot com 2003-11-15 14:06 -------
(In reply to comment #2)
> but since I do not know if the code invokes undefined behavior, I am not
confirming this
> one.
Thanks for your interest. Perhaps this would be a convincing demonstration (if
you can reproduce it):
martind@kenny:~/playpen$ cat max-enum2.cpp
#include <iostream>
enum E {
E1, E2
};
const E& max2(const E& a, const E& b) {
return a < b ? b : a;
}
int main() {
std::cout << max2(E1, E2) << std::endl;
}
martind@kenny:~/playpen$ g++ -W -Wall -pedantic -v -O2 max-enum2.cpp
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Configured with: ../src/configure -v --enable-languages=c,c++,java,f77,pascal,ob
jc,ada,treelang --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3
--enable-shared --with-system-zlib - -enable-nls
--without-included-gettext --enable-__cxa_atexit --enable-clocale=gn u
--enable-debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc
i486-linux
Thread model: posix
gcc version 3.3.2 (Debian)
/usr/lib/gcc-lib/i486-linux/3.3.2/cc1plus -quiet -v -D__GNUC__=3 -D__GNUC_MINOR
__=3 -D__GNUC_PATCHLEVEL__=2 -D_GNU_SOURCE max-enum2.cpp -D__GNUG__=3
-quiet -du mpbase max-enum2.cpp -auxbase max-enum2 -O2 -W -Wall
-pedantic -version -o /tmp/ ccNFFKYd.s
GNU C++ version 3.3.2 (Debian) (i486-linux)
compiled by GNU C version 3.3.2 (Debian).
GGC heuristics: --param ggc-min-expand=34 --param ggc-min-heapsize=7673
ignoring nonexistent directory "/usr/i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.3
/usr/include/c++/3.3/i486-linux
/usr/include/c++/3.3/backward
/usr/local/include
/usr/lib/gcc-lib/i486-linux/3.3.2/include
/usr/include
End of search list.
max-enum2.cpp: In function `const E& max2(const E&, const E&)':
max-enum2.cpp:6: warning: returning reference to temporary
as -V -Qy -o /tmp/ccFrrEWo.o /tmp/ccNFFKYd.s
GNU assembler version 2.14.90.0.7 (i386-linux) using BFD version 2.14.90.0.7 200
31029 Debian GNU/Linux
/usr/lib/gcc-lib/i486-linux/3.3.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-
linker /lib/ld-linux.so.2
/usr/lib/gcc-lib/i486-linux/3.3.2/../../../crt1.o /usr
/lib/gcc-lib/i486-linux/3.3.2/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.2/
crtbegin.o -L/usr/lib/gcc-lib/i486-linux/3.3.2
-L/usr/lib/gcc-lib/i486-linux/3.3 .2/../../.. /tmp/ccFrrEWo.o -lstdc++
-lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/li
b/gcc-lib/i486-linux/3.3.2/crtend.o /usr/lib/gcc-lib/i486-linux/3.3.2/../../../c
rtn.o
martind@kenny:~/playpen$ ./a.out
-1073742500
martind@kenny:~/playpen$
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (2 preceding siblings ...)
2003-11-15 14:07 ` mdorey at bluearc dot com
@ 2003-11-16 17:47 ` bangerth at dealii dot org
2003-11-16 17:55 ` falk at debian dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: bangerth at dealii dot org @ 2003-11-16 17:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From bangerth at dealii dot org 2003-11-16 17:47 -------
The code in comment #3 is definitely wrong. You call
max(E1,E2)
both E1 and E2 are names that when evaluated yield temporary variables. These
temporaries are then bound to the constant references in the args to max, and
you return a reference to a temporary from that function. The lifetime of the temporary
ends at the end of the call expression, so you get garbage when using the result int
the call to operator<<
W.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (3 preceding siblings ...)
2003-11-16 17:47 ` bangerth at dealii dot org
@ 2003-11-16 17:55 ` falk at debian dot org
2003-11-18 5:28 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: falk at debian dot org @ 2003-11-16 17:55 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From falk at debian dot org 2003-11-16 17:55 -------
(In reply to comment #4)
> The code in comment #3 is definitely wrong. You call
> max(E1,E2)
> both E1 and E2 are names that when evaluated yield temporary variables.
I don't think so. The standard says:
"The identifiers in an enumerator-list are declared as constants, and can appear
wherever constants are required."
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (4 preceding siblings ...)
2003-11-16 17:55 ` falk at debian dot org
@ 2003-11-18 5:28 ` pinskia at gcc dot gnu dot org
2003-11-19 4:23 ` gdr at integrable-solutions dot net
` (4 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-18 5:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-18 05:28 -------
Is a type of "const enum &" an lvalue, if it is then this is a bug in 3.3, otherwise there is a bug in
3.4 because of 5.16/4 If the second and third operands are lvalues and have the same type, the
result is of that type is an lvalue.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (5 preceding siblings ...)
2003-11-18 5:28 ` pinskia at gcc dot gnu dot org
@ 2003-11-19 4:23 ` gdr at integrable-solutions dot net
2003-11-20 7:16 ` mdorey at bluearc dot com
` (3 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: gdr at integrable-solutions dot net @ 2003-11-19 4:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From gdr at integrable-solutions dot net 2003-11-19 04:23 -------
Subject: Re: [3.3 regression] max(enum) returns reference to temporary
"bangerth at dealii dot org" <gcc-bugzilla@gcc.gnu.org> writes:
| The code in comment #3 is definitely wrong. You call
| max(E1,E2)
| both E1 and E2 are names that when evaluated yield temporary variables. These
| temporaries are then bound to the constant references in the args to max, and
| you return a reference to a temporary from that function. The lifetime of the temporary
| ends at the end of the call expression,
No, the temporaries last until the end of the full expression.
-- Gaby
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (6 preceding siblings ...)
2003-11-19 4:23 ` gdr at integrable-solutions dot net
@ 2003-11-20 7:16 ` mdorey at bluearc dot com
2003-11-20 7:18 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 12+ messages in thread
From: mdorey at bluearc dot com @ 2003-11-20 7:16 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mdorey at bluearc dot com 2003-11-20 07:16 -------
(In reply to comment #7)
> No, the temporaries last until the end of the full expression.
Just so but, for any sceptics in the audience, this produces similarly
incorrect output:
trevithick:~/playpen$ cat max-enum3.cpp && g++ -W -Wall -pedantic -v -O2 max-
enum3.cpp && ./a.out
#include <iostream>
enum E {
E1, E2
};
const E& max2(const E& a, const E& b) {
return a < b ? b : a;
}
int main() {
E e1 = E1;
E e2 = E2;
std::cout << max2(e1, e2) << std::endl;
}
Reading specs from /usr/lib/gcc-lib/i486-linux/3.3.2/specs
Configured with: ../src/configure -v --enable-
languages=c,c++,java,f77,pascal,objc,ada,treelang --prefix=/usr --
mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-
dir=/usr/include/c++/3.3 --enable-shared --with-system-zlib --enable-nls --
without-included-gettext --enable-__cxa_atexit --enable-clocale=gnu --enable-
debug --enable-java-gc=boehm --enable-java-awt=xlib --enable-objc-gc i486-linux
Thread model: posix
gcc version 3.3.2 (Debian)
/usr/lib/gcc-lib/i486-linux/3.3.2/cc1plus -quiet -v -D__GNUC__=3 -
D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=2 -D_GNU_SOURCE max-enum3.cpp -
D__GNUG__=3 -quiet -dumpbase max-enum3.cpp -auxbase max-enum3 -O2 -W -Wall -
pedantic -version -o /tmp/ccHEBlEU.s
GNU C++ version 3.3.2 (Debian) (i486-linux)
compiled by GNU C version 3.3.2 (Debian).
GGC heuristics: --param ggc-min-expand=98 --param ggc-min-heapsize=129171
ignoring nonexistent directory "/usr/i486-linux/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/include/c++/3.3
/usr/include/c++/3.3/i486-linux
/usr/include/c++/3.3/backward
/usr/local/include
/usr/lib/gcc-lib/i486-linux/3.3.2/include
/usr/include
End of search list.
max-enum3.cpp: In function `const E& max2(const E&, const E&)':
max-enum3.cpp:6: warning: returning reference to temporary
as -V -Qy -o /tmp/ccALcrp6.o /tmp/ccHEBlEU.s
GNU assembler version 2.14.90.0.7 (i386-linux) using BFD version 2.14.90.0.7
20031029 Debian GNU/Linux
/usr/lib/gcc-lib/i486-linux/3.3.2/collect2 --eh-frame-hdr -m elf_i386 -dynamic-
linker /lib/ld-linux.so.2 /usr/lib/gcc-lib/i486-
linux/3.3.2/../../../crt1.o /usr/lib/gcc-lib/i486-
linux/3.3.2/../../../crti.o /usr/lib/gcc-lib/i486-linux/3.3.2/crtbegin.o -
L/usr/lib/gcc-lib/i486-linux/3.3.2 -L/usr/lib/gcc-lib/i486-
linux/3.3.2/../../.. /tmp/ccALcrp6.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -
lgcc /usr/lib/gcc-lib/i486-linux/3.3.2/crtend.o /usr/lib/gcc-lib/i486-
linux/3.3.2/../../../crtn.o
-1073744148
Cheers,
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (7 preceding siblings ...)
2003-11-20 7:16 ` mdorey at bluearc dot com
@ 2003-11-20 7:18 ` pinskia at gcc dot gnu dot org
2003-11-20 7:23 ` mdorey at bluearc dot com
2003-12-22 23:30 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-11-20 7:18 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-11-20 07:18 -------
Remember this is fixed for 3.4 already.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Last reconfirmed|0000-00-00 00:00:00 |2003-11-20 07:18:20
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (8 preceding siblings ...)
2003-11-20 7:18 ` pinskia at gcc dot gnu dot org
@ 2003-11-20 7:23 ` mdorey at bluearc dot com
2003-12-22 23:30 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: mdorey at bluearc dot com @ 2003-11-20 7:23 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mdorey at bluearc dot com 2003-11-20 07:23 -------
(In reply to comment #9)
> Remember this is fixed for 3.4 already.
And 3.3 (at least the version and configuration I just submitted the -v for) is
producing a warning even with no flags - so it's not a *silent* code-gen bug.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
* [Bug c++/12667] [3.3 regression] max(enum) returns reference to temporary
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
` (9 preceding siblings ...)
2003-11-20 7:23 ` mdorey at bluearc dot com
@ 2003-12-22 23:30 ` pinskia at gcc dot gnu dot org
10 siblings, 0 replies; 12+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-12-22 23:30 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-12-22 22:57 -------
Too much for the branch so closing as will not fix for 3.3.3.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |WONTFIX
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12667
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-12-22 22:57 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-18 0:15 [Bug c++/12667] New: max(enum) returns reference to temporary mdorey at bluearc dot com
2003-10-18 0:46 ` [Bug c++/12667] " pinskia at gcc dot gnu dot org
2003-11-15 11:31 ` [Bug c++/12667] [3.3 regression] " pinskia at gcc dot gnu dot org
2003-11-15 14:07 ` mdorey at bluearc dot com
2003-11-16 17:47 ` bangerth at dealii dot org
2003-11-16 17:55 ` falk at debian dot org
2003-11-18 5:28 ` pinskia at gcc dot gnu dot org
2003-11-19 4:23 ` gdr at integrable-solutions dot net
2003-11-20 7:16 ` mdorey at bluearc dot com
2003-11-20 7:18 ` pinskia at gcc dot gnu dot org
2003-11-20 7:23 ` mdorey at bluearc dot com
2003-12-22 23:30 ` 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).