13.07.2015 Views

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

C# Language Specification - Willy .Net

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Appendix B Portability issuesB. Portability issuesThis clause is informative.This annex collects some information about portability that appears in this International Standard.B.1 Undefined behaviorA program that does not contain any occurrences of the unsafe modifier cannot exhibit any undefinedbehavior.The behavior is undefined in the following circumstances:1. When dereferencing the result of converting one pointer type to another and the resulting pointer is notcorrectly aligned for the pointed-to type. (§25.4)2. When the unary * operator is applied to a pointer containing an invalid value (§25.5.1).3. When a pointer is subscripted to access an out-of-bounds element (§25.5.3).4. Modifying objects of managed type through fixed pointers (§25.6)5. The initial content of memory allocated by stackalloc (§25.7).B.2 Implementation-defined behaviorA conforming implementation is required to document its choice of behavior in each of the areas listed inthis clause. The following are implementation-defined:1. The behavior when an identifier not in Normalization Form C is encountered (§9.4.2).2. The values of any application parameters passed to Main by the host environment prior to applicationstartup (§10.1).3. Whether a System.ArithmeticException (or a subclass thereof) is thrown or the overflow goesunreported with the resulting value being that of the left operand, when in an unchecked context andthe left operand of an integer division is the maximum negative int or long value and the right operandis –1. (§14.7.2).4. The mechanism by which linkage to an external function is achieved (§17.5.7).5. The impact of thread termination when no matching catch clause is found for an exception and the codethat initially started that thread is reached. (§23.3)6. The purpose of attribute target specifiers other than those identified by this standard (§24.2).7. The mappings between pointers and integers (§25.4).8. The effect of applying the unary * operator to a null pointer (§25.5.1).9. The behavior when pointer arithmetic overflows the domain of the pointer type (§25.5.5).361

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!