fix preprocessing *.S with ` ' chars in #comments
with a test program. Problem detected when trying to
    compile linux-2.4.37.9 with tcc.
			
			
This commit is contained in:
		
							parent
							
								
									5fb57bead4
								
							
						
					
					
						commit
						16cbca281f
					
				
					 3 changed files with 17 additions and 1 deletions
				
			
		
							
								
								
									
										4
									
								
								tccpp.c
									
										
									
									
									
								
							
							
						
						
									
										4
									
								
								tccpp.c
									
										
									
									
									
								
							| 
						 | 
				
			
			@ -796,6 +796,8 @@ redo_start:
 | 
			
		|||
                    in_warn_or_error = 1;
 | 
			
		||||
                else if (tok == TOK_LINEFEED)
 | 
			
		||||
                    goto redo_start;
 | 
			
		||||
                else if (parse_flags & PARSE_FLAG_ASM_FILE)
 | 
			
		||||
                    p = parse_line_comment(p);
 | 
			
		||||
            } else if (parse_flags & PARSE_FLAG_ASM_FILE)
 | 
			
		||||
                p = parse_line_comment(p);
 | 
			
		||||
            break;
 | 
			
		||||
| 
						 | 
				
			
			@ -2743,6 +2745,8 @@ maybe_newline:
 | 
			
		|||
        p++;
 | 
			
		||||
        break;
 | 
			
		||||
    default:
 | 
			
		||||
        if (parse_flags & PARSE_FLAG_ASM_FILE)
 | 
			
		||||
            goto parse_simple;
 | 
			
		||||
        tcc_error("unrecognized character \\x%02x", c);
 | 
			
		||||
        break;
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
							
								
								
									
										6
									
								
								tests/pp/13.S
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								tests/pp/13.S
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
# `modelist' label. Each video mode record looks like:
 | 
			
		||||
#ifdef AAA
 | 
			
		||||
# modelist' label. Each video mode record looks like:
 | 
			
		||||
#endif
 | 
			
		||||
.text
 | 
			
		||||
endtext:
 | 
			
		||||
							
								
								
									
										6
									
								
								tests/pp/13.expect
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								tests/pp/13.expect
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,6 @@
 | 
			
		|||
# `modelist' label. Each video mode record looks like:
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
.text
 | 
			
		||||
endtext:
 | 
			
		||||
		Loading…
	
	Add table
		
		Reference in a new issue