warn about declarations after statements when compiling with gcc.
This commit is contained in:
		
							parent
							
								
									1351de6ad1
								
							
						
					
					
						commit
						2e51f0ee63
					
				
					 1 changed files with 5 additions and 0 deletions
				
			
		
							
								
								
									
										5
									
								
								configure
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								configure
									
										
									
									
										vendored
									
									
								
							| 
						 | 
					@ -387,6 +387,11 @@ else
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# a final configuration tuning
 | 
					# a final configuration tuning
 | 
				
			||||||
 | 
					W_OPTIONS="declaration-after-statement"
 | 
				
			||||||
 | 
					for i in $W_OPTIONS; do
 | 
				
			||||||
 | 
					    O_PRESENT="$($cc -v --help 2>&1 | grep -- -W$i)"
 | 
				
			||||||
 | 
					    if test -n "$O_PRESENT"; then  CFLAGS="$CFLAGS -W$i"; fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign sign-compare unused-result uninitialized"
 | 
					W_OPTIONS="deprecated-declarations strict-aliasing pointer-sign sign-compare unused-result uninitialized"
 | 
				
			||||||
for i in $W_OPTIONS; do
 | 
					for i in $W_OPTIONS; do
 | 
				
			||||||
    O_PRESENT="$($cc -v --help 2>&1 | grep -- -W$i)"
 | 
					    O_PRESENT="$($cc -v --help 2>&1 | grep -- -W$i)"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue