Alexandre Oliva <aol...@redhat.com> writes: > On Jan 26, 2018, Jakub Jelinek <ja...@redhat.com> wrote: > >> Having to tweak debug info consumers so that they treat DW_LLE_* of 9 >> one way for .debug_loclist of version 5 and another way for .debug_loclist >> of version 6 isn't a good idea. > > Maybe we don't have to do that. The reason I implemented the proposed > format was to have a reference implementation, but since it's an > extension to a non-extensible part of DWARF5, it's hard to justify > consumer implementations for that. > >> Why don't you emit the DW_LLE_GNU_view_pair stuff in .debug_loclists >> already with -gdwarf-5, if needed paired without some TU attribute that says >> that views are emitted? > > Because that would make the loclists unreadable for any DWARF5-compliant > consumer. > > >> Haven't looked for it it in the coding standards, but it is something >> I've been asked to do in my code by various reviewers over the years and >> what I've been asking others in my patch reviews from others too. > > Thanks. It was the first (well, second; you'd requested similar changes > another time before) I heard of that. I'm still unconvinced the way I > used is not compliant, but I'll keep that in mind. Hopefully I won't > run into someone who insists the other one (the one you reject) is the > only correct one ;-) > >> I feel strongly about indenting stuff right, > > I'm with you on that, we just have different ideas about what "right" > stands for ;-) > >> which if it wouldn't fit would be >> return verylongcondition____________________________________ >> && otherlongcondition__________________________________; >> rather than >> return verylongcondition____________________________________ >> && otherlongcondition__________________________________; >> or similar, it would surprise me if it is not in the coding standard. > > I agree neither of these two forms is correct. > > But it is my understanding that both of the following are correct: > > return (verylongcondition____________________________________ > && otherlongcondition__________________________________); > > return verylongcondition____________________________________ > && otherlongcondition__________________________________; > > The first, because the parenthesized expression is continued with > indentation to match the parenthesis, the second because the return > statement is continued with the correct indentation for the continuation > of a statement.
Thought it had to be the first. When they talk about indenting leading operators, the conventions say: Insert extra parentheses so that Emacs will indent the code properly. which at least implies that not inserting parantheses and indenting by two spaces isn't "properly". And I think most GCC code does stick to that (i.e. use the bracketed form). Thanks, Richard