Force const. expr. in expr_cond outside function
Since no code should be generated outside a function, force expr_cond to only consider constant expression when outside a function since the generic code can generate some code.
This commit is contained in:
		
							parent
							
								
									339f961c11
								
							
						
					
					
						commit
						b2f5ee9b2d
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		
							
								
								
									
										2
									
								
								tccgen.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								tccgen.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -4038,7 +4038,7 @@ static void expr_cond(void)
 | 
			
		|||
    SValue sv;
 | 
			
		||||
    CType type, type1, type2;
 | 
			
		||||
 | 
			
		||||
    if (const_wanted) {
 | 
			
		||||
    if (const_wanted || (cur_text_section == NULL)) {
 | 
			
		||||
        expr_lor_const();
 | 
			
		||||
        if (tok == '?') {
 | 
			
		||||
            CType boolean;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue