bcc icon indicating copy to clipboard operation
bcc copied to clipboard

Empty Flags Enum leads to incorrect C code

Open GWRon opened this issue 11 months ago • 0 comments

SuperStrict
Framework Brl.StandardIO

Enum EEmptyFlagsEnum flags
End Enum

generates (debug build, same for release build):

struct BBEnum_m_untitled3_EEmptyFlagsEnum{
	const char * name;
	char * type;
	char * atype;
	int flags;
	int length;
	void * values;
	BBString * names[0];
};
const BBINT bbEnum_m_untitled3_EEmptyFlagsEnum_Mask = ;
struct BBDebugScope _m_untitled3_EEmptyFlagsEnum_scope ={
	BBDEBUGSCOPE_USERENUM,
	"EEmptyFlagsEnum",
	{
		{
			BBDEBUGDECL_END
		}
	}
};

output:

/BlitzMaxNG/tmp/.bmx/untitled3.bmx.console.release.linux.x64.c:45:101: error: ‘_m_untitled3_EEmptyFlagsEnum_scope’ undeclared (first use in this function); did you mean ‘_m_untitled3_EEmptyFlagsEnum_values’?
   45 |                 bbEnumRegister((BBEnum *)_m_untitled3_EEmptyFlagsEnum_BBEnum_impl, (BBDebugScope *)&_m_untitled3_EEmptyFlagsEnum_scope);
      |                                                                                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                                                                     _m_untitled3_EEmptyFlagsEnum_values
/BlitzMaxNG/tmp/.bmx/untitled3.bmx.console.release.linux.x64.c:45:101: note: each undeclared identifier is reported only once for each function it appears in

GWRon avatar Feb 11 '25 15:02 GWRon