﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4571	MetaModelica function pointer with underscore generates invalid code	Per Östlund	Martin Sjölund	"A MetaModelica function pointer that has an underscore in its name causes the code generation to expand the underscore to !__ when using the function, but not when declaring it. For example:
{{{#!mo
  partial function pf
  end pf;
    
  pf fu_nc = f;
algorithm
  fu_nc();
}}}
generates the following C-code (note _fu_nc on first lines and _fu!__nc on last):
{{{#!c
  modelica_fnptr _fu_nc;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  _fu_nc = boxvar_f;
  (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_fu__nc), 2))) ? ((void(*)(threadData_t*, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_fu__nc), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_fu__nc), 2)))) : ((void(*)(threadData_t*)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_fu__nc), 1)))) (threadData);
}}}"	defect	closed	normal	1.13.0	MetaModelica	v1.13.0-dev-nightly	fixed		
