Recent

Author Topic: Get rid of the assembler attribute in OBJFPC mode ?  (Read 1651 times)

Basile B.

  • Guest
Get rid of the assembler attribute in OBJFPC mode ?
« on: January 06, 2015, 06:56:56 pm »
The Q is here:

https://stackoverflow.com/questions/27790724/omit-assembler-keyword-for-assembler-functions/27793497?noredirect=1#comment44015691_27793497

in my answer, I assert that it's only possible in {$MODE DELPHI}, I might be wrong. Is that right ?


engkin

  • Hero Member
  • *****
  • Posts: 2513
Re: Get rid of the assembler attribute in OBJFPC mode ?
« Reply #1 on: January 06, 2015, 07:24:51 pm »
Your answer is right according to the source code of the compiler:
Code: [Select]
         { do we have an assembler block without the po_assembler?
           we should allow this for Delphi compatibility (PFV) }
         if (token=_ASM) and (m_delphi in current_settings.modeswitches) then
           include(current_procinfo.procdef.procoptions,po_assembler);