On Fri, Jan 24, 2020 at 11:53 PM Joseph Myers <jos...@codesourcery.com> wrote: > > On Fri, 24 Jan 2020, Prathamesh Kulkarni wrote: > > > The middle-end representation issue of ERF_RETURNS_ARG still remains, > > which restricts the attribute till first four args. The patch simply > > emits sorry(), for arguments beyond first four.. > > I think this should be fixed (e.g. make the middle-end check for the > attribute, or something like that).
Since it's pure optimization you can also simply chose to ignore this without notice. Note ERF_RETURN_ARG_MASK is limited to the number of available bits in an int and practically the only current setter was via "fn spec" which uses a single digit [1-9] to denote the argument (so limiting to three is indeed an odd choice but matches builtins using this at the moment). Feel free to up ERF_RETURN_ARG_MASK (but then you need to adjust the ERF_ flag defines). > The language semantics of the > attribute should not be driven by such internal implementation details; > rather, implementation details should be determined by the language > semantics to be implemented. > > The sorry () has coding style issues. Diagnostics should not end with '.' > or '\n', should use full words (attribute not attr, arguments not args) > and programming language text in them should be surrounded by %<%> (so > %<returns_arg%>). > > -- > Joseph S. Myers > jos...@codesourcery.com