Matthieu Longo <matthieu.lo...@arm.com> writes: > On 2024-10-08 18:45, Richard Sandiford wrote: >> However... >> >>> + return s; >> >> ...we are unfortunately limited to C++11 constexprs, so I think this needs >> to be: >> >> return (t == uleb128 ? "ULEB128" >> : t == asciz ? "asciz" >> : nullptr); >> >> if we want it to be treated as a constant for all builds. >> > > Fixed in the next revision. > FYI we might have C++14 soon :) => > https://gcc.gnu.org/pipermail/gcc-patches/2024-October/665644.html
Great! Looking forward to finally being able to stop working around this :) Of course, it'd be OK to change back to a switch statement once the transition has happened (in stage 1). >>> +class aeabi_subsection >>> +{ >>> + public: >>> + aeabi_subsection (const char *name, bool optional): >>> + name_(name), >>> + optional_(optional), >>> + avtype_(details::deduce_attr_av_type (T_val{})) >> >> Formatting nit, should be indented as: >> >> class aeabi_subsection >> { >> public: >> aeabi_subsection (const char *name, bool optional) >> : name_ (name) >> ... >> >> But the usual GCC style is to use an "m_" prefix for private members, >> rather than a "_" suffix. >> > > Fixed. > > For "public:", Richard Earnshaw recommended not to respect the > recommended GNU style as it breaks the mklog script, and keep 1 space > before. OK, that's fair. Thanks, Richard