[Bug c++/28363] New: Default template parameter causes compiler segfault

2006-07-12 Thread eric dot lemings at roguewave dot com
[EMAIL PROTECTED] tests]$ gcc --version
gcc (GCC) 4.1.0
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

[EMAIL PROTECTED] tests]$ cat test01.cpp

template
<
  class T1, class T2,
  template < int > class T0 = T1,
>
struct A {
};

[EMAIL PROTECTED] tests]$ g++ -Wall -g test01.cpp -o test01
test01.cpp:5: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See http://gcc.gnu.org/bugs.html> for instructions.
[EMAIL PROTECTED] tests]$


-- 
   Summary: Default template parameter causes compiler segfault
   Product: gcc
   Version: 4.1.0
Status: UNCONFIRMED
  Severity: major
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: eric dot lemings at roguewave dot com


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



[Bug c/31273] New: Erroneous bitfield conversions to boolean values

2007-03-19 Thread eric dot lemings at roguewave dot com
The following code compiles fine in GCC 4.1.

enum E { e };
struct S {
  E v:5;
};
S s;
int main() { if (!s.v) return 0; }

In 4.2 (20070307), it gives the following error:

test.cpp: In function 'int main()':
test02.cpp:6: error: could not convert 's.S::v' to 'bool'
test02.cpp:6: error: in arguument to unary !

Jim Wilson has suggested this is a bug due to recent patches to the 4.2 branch.


-- 
   Summary: Erroneous bitfield conversions to boolean values
   Product: gcc
   Version: 4.2.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: eric dot lemings at roguewave dot com


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