[cfe-users] Are these bugs for the clang compilers?

2020-05-26 Thread Tianyou via cfe-users
Hello everyone, I found some questionable behaviors in the clang compiler. I tried to calculate the smallest number in my machine with clang. I did it by looping as:  a = a / 1.73 In g++, after 1358 loops, I found that a = 4.94066E-324, and the value of a never changes from loop 1358 till the

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Ray Lischner via cfe-users
On 5/26/20 2:57 PM, Richard Smith wrote: Can you humor me for a second and try calling 'view.begin()' directly before using std::ranges::begin? (I'm suspicious that we're somehow not triggering instantiation of istream_view until too late; calling 'view.begin()' earlier would resolve the probl

Re: [cfe-users] Location of function name?

2020-05-26 Thread Richard Smith via cfe-users
On Fri, 22 May 2020 at 19:06, Sterling B via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi Clang Experts, could you kindly advice how to get location of a > function *name* when visiting FunctionDecl in RecursiveASTVisitor > (getBeginLoc and getEndLoc return the whole range for the definition,

Re: [cfe-users] _Decimal128 on PowerPC

2020-05-26 Thread Richard Smith via cfe-users
On Fri, 8 May 2020 at 00:09, Jeffrey Walton via cfe-users < cfe-users@lists.llvm.org> wrote: > Hi Everyone, > > I'm testing Steven Munroe's pveclib library > (https://github.com/munroesj52/pveclib). It is testing OK with GCC, > but I am having trouble with Clang. > > I've been able to test up to C

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Richard Smith via cfe-users
On Tue, 26 May 2020 at 07:39, Ray Lischner via cfe-users < cfe-users@lists.llvm.org> wrote: > On 5/15/20 6:53 PM, Richard Smith wrote: > > Can you try calling begin() on an istream_view& directly, and see > > if you get the same error? > > $ cat istream_begin.cpp > #include > #include > #include

Re: [cfe-users] Compiling C++ 20 Example from 24.6.4.1 [range.istream.overview] produces errors with libstdc++ 10

2020-05-26 Thread Ray Lischner via cfe-users
On 5/15/20 6:53 PM, Richard Smith wrote: Can you try calling begin() on an istream_view& directly, and see if you get the same error? $ cat istream_begin.cpp #include #include #include #include int main() { auto ints = std::istringstream{"0 1 2 3 4"}; auto view{ std::ranges::istream_vi