What should be the type of 9223372036854775808L ? unsigned long or signed __int128?

2023-08-08 Thread Helmut Zeisel via Gcc
GCC13, c++, cygwin 64: auto x = 9223372036854775808L gives the warning: "integer constant is so large that it is unsigned" But actually the type is signed __int128: std::cout << x; gives the error: "ambiguous overload for ‘operator<<’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostre

When do I need -fnon-call-exceptions?

2023-06-07 Thread Helmut Zeisel via Gcc
I wrote some simple program that set a signal handler for SIGFPE, throws a C++ exception in the signal handler and catches the exception. I compiled with and without -fnon-call-exceptions (on x64 Linux). In both cases, the result was the same: the exception was caught and the destructors were cal

Aw: Re: GCC 13.1 compile error when using CXXFLAGS=-std=c++20

2023-04-27 Thread Helmut Zeisel via Gcc
>Von: "Jakub Jelinek" >An: "Helmut Zeisel" >Cc: gcc@gcc.gnu.org >Betreff: Re: GCC 13.1 compile error when using CXXFLAGS=-std=c++20 >On Thu, Apr 27, 2023 at 11:09:19AM +0200, Helmut Zeisel via Gcc wrote: >> I compiled GCC 13.1.0 with GCC 12 and had the

GCC 13.1 compile error when using CXXFLAGS=-std=c++20

2023-04-27 Thread Helmut Zeisel via Gcc
I compiled GCC 13.1.0 with GCC 12 and had the environment variable CXXFLAGS set to -std=c++20 This gives the error (both linux and cygin) gcc-13.1.0/libstdc++-v3/src/c++98/bitmap_allocator.cc:51:23: error: ISO C++17 does not allow dynamic exception specifications 51 | _M_get(size_t __sz) th

Aw: Re: Warning: shared mutable data

2023-02-17 Thread Helmut Zeisel via Gcc
Von: "Jonathan Wakely"  > What exactly are you suggesting for the semantics of the warning? Good question. It is difficult to detect all suspiscious cases, but at least some of the can be defined: If we have a function prototype f(...,Ti xi,...Tj xj,...) and call the function f(... xi, ..

Warning: shared mutable data

2023-02-17 Thread Helmut Zeisel via Gcc
le to find all such possbible errors when the complete program is compiled with this warning enabled? Even if it were not possible to detect all cases, also detecting some cases might prevent some bugs. What do you think about adding a warning "shared mutable data" to GCC? Helmut Zeisel

Re: Bug in GCC 7.1?

2017-05-05 Thread Helmut Zeisel
I added it to bugzilla, Bug 80641 Helmut   

Bug in GCC 7.1?

2017-05-05 Thread Helmut Zeisel
The following program gives a warning under GCC 7.1 (built on cygwin, 64 bit) #include int main() { std::vector c {1,2,3,0}; while(c.size() > 0 && c.back() == 0) { auto sz = c.size() -1; c.resize(sz); } return 0; } $ c++7.1 -O3 tt.cxx In Funktion »int main()