Hello all,

I actually like the idea of supporting the suggested attributes,
provided they work and behave the same way with and without LTO.

- NOINLINE: I disagree with Steve here; we shouldn't invent a new
  syntax (noinline on/off), and rather follow what other compilers
  provide (INLINE/NOINLINE).

- NORETURN: this is an important attribute, as your testcases show.
  However:

+@item @code{NORETURN} -- add hint that given function cannot return.  This
+makes slightly better code.  More importantly, it helps avoid spurious warnings
+of uninitialized variables.

  I would not claim "This makes slightly better code", but rather
  that it provides additional optimization opportunities.

  Can you explain why you wrote that it should help to "avoid spurious
  warnings of uninitialized variables"?  While this attribute does provide
  a useful hint to the compiler, a user should not focus on that attribute
  just to silence the compiler.

- WEAK: I do not like the way it is coded in the provided patch.
  If a target does not support it, we should not generate an error,
  but rather emit a warning that it is not supported.
  It appears that declare_weak() already does that.

Cheers,
Harald

Reply via email to