[jit] Fix the saving of the 'cfg->ret_var_set' flag when inlining, it was set to...
[mono.git] / mcs / docs / ecma334 / 9.5.3.xml
1 <?xml version="1.0"?>
2 <clause number="9.5.3" title="Declaration directives">
3   <paragraph>The declaration directives are used to define or undefine conditional compilation symbols. <grammar_production><name><non_terminal where="9.5.3">pp-declaration</non_terminal></name> :: <rhs><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>#</terminal><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>define</terminal><non_terminal where="9.3.3">whitespace</non_terminal><non_terminal where="9.5.1">conditional-symbol</non_terminal><non_terminal where="9.5.3">pp-new-line</non_terminal></rhs><rhs><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>#</terminal><non_terminal where="9.3.3">whitespace</non_terminal><opt/><terminal>undef</terminal><non_terminal where="9.3.3">whitespace</non_terminal><non_terminal where="9.5.1">conditional-symbol</non_terminal><non_terminal where="9.5.3">pp-new-line</non_terminal></rhs></grammar_production><grammar_production><name><non_terminal where="9.5.3">pp-new-line</non_terminal></name> :: <rhs><non_terminal where="9.3.3">whitespace</non_terminal><opt/><non_terminal where="9.3.2">single-line-comment</non_terminal><opt/><non_terminal where="9.3.1">new-line</non_terminal></rhs></grammar_production></paragraph>
4   <paragraph>The processing of a <symbol>#define</symbol> directive causes the given conditional compilation symbol to become defined, starting with the source line that follows the directive. Likewise, the processing of an <symbol>#undef</symbol> directive causes the given conditional compilation symbol to become undefined, starting with the source line that follows the directive. </paragraph>
5   <paragraph>Any <symbol>#define</symbol> and <symbol>#undef</symbol> directives in a source file must occur before the first token (<hyperlink>9.4</hyperlink>) in the source file; otherwise a compile-time error occurs. In intuitive terms, <symbol>#define</symbol> and <symbol>#undef</symbol> directives must precede any &quot;real code&quot; in the source file. </paragraph>
6   <paragraph>
7     <example>[Example: The example: <code_example><![CDATA[
8 #define Enterprise  
9 #if Professional || Enterprise  
10 #define Advanced  
11 #endif  
12 namespace Megacorp.Data  
13 {  
14    #if Advanced  
15    class PivotTable {...}  
16    #endif  
17 }  
18 ]]></code_example>is valid because the <symbol>#define</symbol> directives precede the first token (the namespace keyword) in the source file. end example]</example>
19   </paragraph>
20   <paragraph>
21     <example>[Example: The following example results in a compile-time error because a <symbol>#define</symbol> follows real code: <code_example><![CDATA[
22 #define A  
23 namespace N  
24 {  
25    #define B  
26    #if B  
27    class Class1 {}  
28    #endif  
29 }  
30 ]]></code_example>end example]</example>
31   </paragraph>
32   <paragraph>A <symbol>#define</symbol> may define a conditional compilation symbol that is already defined, without there being any intervening <symbol>#undef</symbol> for that symbol. <example>[Example: The example below defines a conditional compilation symbol A and then defines it again. <code_example><![CDATA[
33 #define A  
34 #define A  
35 ]]></code_example></example></paragraph>
36   <paragraph>
37     <example>For compilers that allow conditional compilation symbols to be defined as compilation options, an alternative way for such redefinition to occur is to define the symbol as a compiler option as well as in the source. end example]</example>
38   </paragraph>
39   <paragraph>A <symbol>#undef</symbol> may &quot;undefine&quot; a conditional compilation symbol that is not defined. <example>[Example: The example below defines a conditional compilation symbol A and then undefines it twice; although the second <symbol>#undef</symbol> has no effect, it is still valid. <code_example><![CDATA[
40 #define A  
41 #undef A  
42 #undef A  
43 ]]></code_example>end example]</example> </paragraph>
44 </clause>