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

MacPorts noreply at macports.org
Mon Mar 25 02:23:34 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:2 kencu]:
 > moving the attribute setting before the function declaration like this
 also works, and I think this is the proper way to do it anyway:
 > {{{
 > #ifdef __APPLE__
 >     /* Need to turn off optimizations so weak framework load check works
 */
 >     __attribute__ ((optnone))
 > #endif
 > int IMG_InitWEBP()
 > }}}

 Thank you, Ken!

 I will try that, and we should make a PR to allow building with GCC.

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


More information about the macports-tickets mailing list