oduct: gcc
Version: unknown
Status: UNCONFIRMED
Severity: critical
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: shenrfen at gmail dot com
GCC build triplet: x86
GCC host triplet: x86
GCC ta
--- Comment #2 from shenrfen at gmail dot com 2009-06-04 09:09 ---
The expected result should be -1, not 255.
But the result is 255 when I use g++ to compiling this code.
--
shenrfen at gmail dot com changed:
What|Removed |Added
--- Comment #3 from shenrfen at gmail dot com 2009-06-04 09:47 ---
I have debug the C++ front-end of gcc3.3.5.
In function finish_switch_cond:
if (cond != error_mark_node)
{
cond = default_conversion (cond);
cond = fold (build1 (CLEANUP_POINT_EXPR
--- Comment #5 from shenrfen at gmail dot com 2009-06-04 10:24 ---
Thanks very much.
Waiting for your patch. the patch of gcc3.3.5 is also expected if you have
enough time to do it. it should be similar with gcc4.**
Thanks agian.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id
nu dot org
ReportedBy: shenrfen at gmail dot com
GCC build triplet: x86
GCC host triplet: x86
GCC target triplet: x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41793
nu dot org
ReportedBy: shenrfen at gmail dot com
GCC build triplet: x86
GCC host triplet: x86
GCC target triplet: x86
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41794
--- Comment #3 from shenrfen at gmail dot com 2009-10-22 09:42 ---
Confused for the result.
int main()
{
struct s t = {1, 2, 3};
printf("0x%llx\n",(t.a-8));
printf("0x%llx\n",(t.b-8));
printf("0x%llx\n",(t.c-8));
}
the out
--- Comment #5 from shenrfen at gmail dot com 2009-10-22 15:46 ---
Thanks very much for all your reply.
But I also have another question, Why is the 3rd output 40bits?
int main()
{
struct s t = {1, 2, 3};
printf("0x%llx\n",(t.a-8));
printf("0
--- Comment #7 from shenrfen at gmail dot com 2009-10-23 01:52 ---
What about the following case? There is not un-defined behavior.
PS :Could you please tell me the full name of DR #120 documents.
Thanks again.
struct s
{
unsigned long long a:2;
unsigned long long b
--- Comment #10 from shenrfen at gmail dot com 2009-10-23 03:06 ---
Thanks very very much.
What a good development team.
Good luck to all of you.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41793
10 matches
Mail list logo