[MacPorts] #69551: libsdl2_image error with gcc: error: attributes should be specified before the declarator in a function definition

MacPorts noreply at macports.org
Sun Mar 31 12:28:50 UTC 2024


#69551: libsdl2_image error with gcc: error: attributes should be specified before
the declarator in a function definition
----------------------------+-----------------------------------------
  Reporter:  barracuda156   |      Owner:  (none)
      Type:  defect         |     Status:  new
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.9.1
Resolution:                 |   Keywords:  tiger, leopard, snowleopard
      Port:  libsdl2_image  |
----------------------------+-----------------------------------------

Comment (by barracuda156):

 Replying to [comment:6 kencu]:
 > it looks like optnone is not an attribute accepted by gcc.
 >
 > there is a different specifier used
 >
 > {{{
 > __attribute__((optimize("O0"))
 > }}}
 >
 > the exact location where this can be placed in the function definition
 is also a bit of reading, eg
 >
 > https://gcc.gnu.org/onlinedocs/gcc/Attribute-Syntax.html
 >

 Could you suggest how to better do it in this case?

 Everything builds with just moving those as you suggested earlier, but of
 course it is better to use a supported attribute.

 P. S. I will convert the PR into a draft for now, so it is not
 accidentally merged: https://github.com/macports/macports-ports/pull/23293

-- 
Ticket URL: <https://trac.macports.org/ticket/69551#comment:7>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list