produce a more informative error message when _Thread_local is used
This commit is contained in:
		
							parent
							
								
									894e166ecf
								
							
						
					
					
						commit
						ab39d34dde
					
				
					 2 changed files with 3 additions and 0 deletions
				
			
		
							
								
								
									
										2
									
								
								tccgen.c
									
										
									
									
									
								
							
							
						
						
									
										2
									
								
								tccgen.c
									
										
									
									
									
								
							| 
						 | 
					@ -4662,6 +4662,8 @@ static int parse_btype(CType *type, AttributeDef *ad, int ignore_label)
 | 
				
			||||||
	    if (type1.ref)
 | 
						    if (type1.ref)
 | 
				
			||||||
                sym_to_attr(ad, type1.ref);
 | 
					                sym_to_attr(ad, type1.ref);
 | 
				
			||||||
            goto basic_type2;
 | 
					            goto basic_type2;
 | 
				
			||||||
 | 
					        case TOK_THREAD_LOCAL:
 | 
				
			||||||
 | 
					            tcc_error("_Thread_local is not implemented");
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            if (typespec_found)
 | 
					            if (typespec_found)
 | 
				
			||||||
                goto the_end;
 | 
					                goto the_end;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								tcctok.h
									
										
									
									
									
								
							
							
						
						
									
										1
									
								
								tcctok.h
									
										
									
									
									
								
							| 
						 | 
					@ -38,6 +38,7 @@
 | 
				
			||||||
     DEF(TOK_RESTRICT2, "__restrict")
 | 
					     DEF(TOK_RESTRICT2, "__restrict")
 | 
				
			||||||
     DEF(TOK_RESTRICT3, "__restrict__")
 | 
					     DEF(TOK_RESTRICT3, "__restrict__")
 | 
				
			||||||
     DEF(TOK_EXTENSION, "__extension__") /* gcc keyword */
 | 
					     DEF(TOK_EXTENSION, "__extension__") /* gcc keyword */
 | 
				
			||||||
 | 
					     DEF(TOK_THREAD_LOCAL, "_Thread_local") /* C11 thread-local storage */
 | 
				
			||||||
 | 
					
 | 
				
			||||||
     DEF(TOK_GENERIC, "_Generic")
 | 
					     DEF(TOK_GENERIC, "_Generic")
 | 
				
			||||||
     DEF(TOK_STATIC_ASSERT, "_Static_assert")
 | 
					     DEF(TOK_STATIC_ASSERT, "_Static_assert")
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue