0

C# Compiler Errors - Nothing less than 100% conformance with the language should be tolerated.

I'm just exploring Resharper for the first time and ran an analysis on some high performance code here.This code builds and runs fine under Visual C# (in VS 2010).Under "C# Compiler Errors" are reports about the use of unsafe pointers:"Cannot declare pointer to non-unmanaged type"and"Cannot take the address of a variable of a managed type"The code though is legal and valid C# - the Visual C# compiler does not report compiler errors or warnings either.Resharper appears to be in error - the code would be invalid if the pointers where not "fixed" (at the CLR level) but the code explicitly uses the "fixed" keyword - this is entirely valid.Also the terminology "non-unmanaged" is poor I think and could be changed to "managed".So unless I'm missing something these particular reports are false alarms and Resharper should not complain about this valid C# in this case.Also why does Resharper have a section named "C# Compiler Errors" unless this matches EXACTLY what the actual C# compiler reports?Opinions welcome!ThanksHugh      

3 comments

Please sign in to leave a comment.