[PATCH] better recovery from type errors in EXPR_COMMA
[smatch.git] / cgcc
blobec9e7ce7f4bbb1b96c8954a326286b51131aa344
1 #!/usr/bin/perl -w
2 # -----------------------------------------------------------------------------
4 my $cc = $ENV{'REAL_CC'} || 'cc';
5 my $check = $ENV{'CHECK'} || 'check';
7 # Look for a .c file. We don't want to run the checker on .o or .so files
8 # in the link run. (This simplistic check knows nothing about options
9 # with arguments, but it seems to do the job.)
10 my $seen_a_c_file = 0;
11 foreach (@ARGV) {
12 if (/^[^-].*\.c/) {
13 $seen_a_c_file = 1;
14 last;
18 if ($seen_a_c_file) {
19 system ($check, @ARGV);
22 exec ($cc, @ARGV);