Re: Comma Operator - Left to Right Associativity

2021-02-04 Thread AJ D via Gcc
Yes, there is only function argument which is the result of the comma operator. On Thu, Feb 4, 2021 at 2:46 PM AJ D wrote: > Nope, -std=c++17 didn’t help either. > > On Thu, Feb 4, 2021 at 1:33 PM David Brown > wrote: > >> >> >> On 04/02/2021 22:21, Andreas Schwab wrote: >> > On Feb 04 2021, Da

Re: Comma Operator - Left to Right Associativity

2021-02-04 Thread AJ D via Gcc
Nope, -std=c++17 didn’t help either. On Thu, Feb 4, 2021 at 1:33 PM David Brown wrote: > > > On 04/02/2021 22:21, Andreas Schwab wrote: > > On Feb 04 2021, David Brown wrote: > > > >> For the built-in comma operator, you get guaranteed order of evaluation > >> (or more precisely, guaranteed orde

Comma Operator - Left to Right Associativity

2021-02-04 Thread AJ D via Gcc
Isn't comma operator suppose to honor left-to-right associativity? When I try it on this test case, it exhibits right-to-left associativity. #include struct CBI; struct EC; struct CET; struct CBI { CBI& operator,(const CBI& rhs) { return *const_cast(&rhs); } }; struct E

GCC DWARF Issue - Frame Pointer Dependency

2020-10-12 Thread AJ D via Gcc
Hi, I have a function for which GCC is generating the following code (just showing the relevant snippet here). 5a70 : 5a70: 4c 8d 54 24 08 lea0x8(%rsp),%r10 5a75: 48 83 e4 f0 and$0xfff0,%rsp 5a79: 41 ff 72 f8

mstackalign vs rbp order in gcc optimization level epilogue/prologue - O2/O3

2020-09-29 Thread AJ D via Gcc
Hi, I was looking at the implementation of mstackalign in gcc (O2/O3) and it looks like we generate code for mstackalign (i.e. generate instructions for stack alignment) before pushing $rbp to stack/setting $rbp. In the epilogue, we do the same in reverse order. some_routine: 0x00