[Bug c++/38228] New: ICE when abusing std::function

2008-11-22 Thread aep at exys dot org
hi, i just tried this for fun (yes i'm aware it doesnt work :P):

#include 
#include 

struct foo 
{ 
void bar(){std::cout<<"hi"<  funct=((f).*(a));
}


and it results in:

[EMAIL PROTECTED] ~/testcases/litb g++ main.cpp --std=gnu++0x
main.cpp: In function ‘int main()’:
main.cpp:13: internal compiler error: in gimplify_expr, at gimplify.c:6864
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.


[EMAIL PROTECTED] ~/testcases/litb g++ -v
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --prefix=/usr --enable-shared
--enable-languages=c,c++,fortran,objc,obj-c++ --enable-threads=posix
--mandir=/usr/share/man --infodir=/usr/share/info --enable-__cxa_atexit
--disable-multilib --libdir=/usr/lib --libexecdir=/usr/lib --enable-clocale=gnu
--with-tune=generic
Thread model: posix
gcc version 4.4.0 20081107 (experimental) (GCC)


-- 
   Summary: ICE when abusing std::function
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: aep at exys dot org


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



[Bug c++/43789] New: warn about pointer aritmetic in sizeof

2010-04-18 Thread aep at exys dot org
Gcc already contains useful warnings for almost certainly incorrect code. I
propose adding a warning when pointer arithmetic is used inside sizeof, that
degrades an array to a pointer.


char a[]="blabla";
sizeof(a-1);

If the intention was _actually_ to get sizeof(char), it is a really awful way
to do so. Instead, it is very likely a typo.
Hence i suggest adding a warning.
thanks.


-- 
   Summary: warn about pointer aritmetic in sizeof
   Product: gcc
   Version: unknown
Status: UNCONFIRMED
  Severity: enhancement
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: aep at exys dot org


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