compiler icon indicating copy to clipboard operation
compiler copied to clipboard

Pawndoc and deprecation messages collide

Open Y-Less opened this issue 2 years ago • 1 comments

#pragma option -r

/**
 * - documentation
 */
#pragma deprecated - message
Func() {}

main()
{
	Func();
}

Output:

warning 234: function is deprecated (symbol "Func") - message
#pragma option -r

main()
{
	Func();
}

/**
 * - documentation
 */
#pragma deprecated - message
Func() {}

Output:

warning 234: function is deprecated (symbol "Func") - documentation 

They both use the ->documentation field in the symbol struct, and clearly order matters.

Y-Less avatar Mar 31 '22 13:03 Y-Less

Furthermore:

//#pragma option -r

main()
{
	Func();
}

/**
 * - documentation
 */
#pragma deprecated - message
Func() {}

Output:

warning 234: function is deprecated (symbol "Func") 

Disabling pawndoc means neither get used.

Y-Less avatar Mar 31 '22 13:03 Y-Less