Re: std::count leaked outside namespace std?

2013-04-23 Thread bd satish
Thanks Paolo, ADL is news to me. On 24 April 2013 01:43, Paolo Carlini wrote: > You are: https://en.wikipedia.org/wiki/Argument-dependent_name_lookup > > Paolo. >

std::count leaked outside namespace std?

2013-04-23 Thread bd satish
Hi, Here's a simple program: #include #include int main() { std::vector vec; count(vec.begin(), vec.end(), 0); // shouldn't this be std::count ? } The above compiles successfully, but I think it shouldn't. I expect a message like "error: `count` not declared in scope" because I meant t

Re: GCC 4.7.2: Mudflap linker errors

2012-09-22 Thread bd satish
> On 21.09.2012 23:08, bd satish wrote: >> g++ -fmudflap references.cc -lmudflap > > you have to install mudflap to use it (it is suggested by the gcc-4.7 > package). > sudo apt-get install libmudflap0-4.7-dev >

Re: GCC 4.7.2: Mudflap linker errors

2012-09-22 Thread bd satish
own-linux-gnu/libmudflap/../../../libmudflap/mf-runtime.c:1436: undefined reference to `__real_free' PS: Please keep me in CC, I'm not subscribed to the list. Thanks & Regards, Satish On 22 September 2012 08:11, bd satish wrote: > Hi, > > Here is the output of (gcc -v): &

Re: GCC 4.7.2: Mudflap linker errors

2012-09-21 Thread bd satish
rank Ch. Eigler wrote: > bd satish writes: > >> [...] >> The following piece of code, gives "undefined references" to >> __real_malloc, __real_free, etc.: >> Compiled with: >> g++ -fmudflap references.cc -lmudflap >> >> /lib64/libmudflap.a

GCC 4.7.2: Mudflap linker errors

2012-09-21 Thread bd satish
Hi, The following piece of code, gives "undefined references" to __real_malloc, __real_free, etc.: // references.cc #include void func(int& x) { x = 0; } int main() { int* p = NULL; func(*p); } Compiled with: g++ -fmudflap references.cc -lmudflap /lib64/libmudflap.a(mf-runtime.o): In

Snapshot tarballs for 4.7-20110528

2011-06-02 Thread bd satish
Hi, All these days there used to be different tarballs like gcc-core-*.tar.bz2, gcc-fortran-*.tar.bz2, etc. in the snapshot directory ftp://gcc.gnu.org/pub/gcc/snapshots/LATEST-4.7. But now I see only one combined tarball (starting with 4.7-20110528). I liked separate tarballs on a per-language ba

segmentation fault with fclose

2011-03-20 Thread bd satish
Hi, I'm trying to close a file using fclose, but the following program seg-faults: #include int main(void) { FILE* fp = fopen("unfounded.txt", "r"); if(fp == NULL) fclose(fp); return 0; } The file I'm trying to open doesn't exist in the directory, so fp is indeed NULL.