@@ -221,32 +221,32 @@ def save_semantics(self) -> None:
221221 )
222222 os .chdir (cwd )
223223
224- def preprocess_file_with_gcc (
224+ def preprocess_file_with_cc (
225225 self ,
226226 cfilename : str ,
227227 copyfiles : bool = True ,
228228 moreoptions : List [str ] = []) -> str :
229- """Invoke gcc preprocessor on c source file.
229+ """Invoke C preprocessor on c source file.
230230
231231 Args:
232232 cfilename: c source code filename relative to cpath
233233 moreoptions: list of additional options to be given to the
234234 preprocessor
235235
236236 Effects:
237- invokes the gcc preprocessor on the c source file and optionally
237+ invokes the C preprocessor on the c source file and optionally
238238 copies the original source file and the generated .i file to the
239- tgtpath/sourcefiles directory
239+ tgtpath/sourcefiles directory.
240240 """
241241
242- chklogger .logger .info ("Preprocess file with gcc : %s" , cfilename )
242+ chklogger .logger .info ("Preprocess file with cc : %s" , cfilename )
243243 cwd = os .getcwd ()
244244 mac = self .config .platform == "mac"
245245 ifilename = cfilename [:- 1 ] + "i"
246246 macoptions = [
247247 "-U___BLOCKS___" , "-D_DARWIN_C_SOURCE" , "-D_FORTIFY_SOURCE=0" ]
248248 cmd = [
249- "gcc " ,
249+ "cc " ,
250250 "-fno-inline" ,
251251 "-fno-builtin" ,
252252 "-E" ,
@@ -498,7 +498,7 @@ def parse_ifiles(self, copyfiles: bool = True) -> None:
498498 targetfiles .save_xml_file (self .analysisresultspath )
499499
500500 def parse_cfiles (self , copyfiles : bool = True ) -> None :
501- """Preprocess (with gcc) and run the CodeHawk C parser on all .c
501+ """Preprocess and run the CodeHawk C parser on all .c
502502 files in the directory."""
503503
504504 os .chdir (self .projectpath )
@@ -509,7 +509,7 @@ def parse_cfiles(self, copyfiles: bool = True) -> None:
509509 fname = self .normalize_filename (os .path .join (d , fname ))
510510 if fname .startswith ("semantics" ):
511511 continue
512- ifilename = self .preprocess_file_with_gcc (fname , copyfiles )
512+ ifilename = self .preprocess_file_with_cc (fname , copyfiles )
513513 self .parse_ifile (ifilename )
514514 targetfiles .add_file (self .normalize_filename (fname ))
515515 targetfiles .save_xml_file (self .analysisresultspath )
@@ -585,7 +585,7 @@ def save_xml_file(self, tgtpath: str) -> None:
585585
586586if __name__ == "__main__" :
587587
588- # preprocess and parse single files with gcc
588+ # preprocess and parse single files with cc
589589 thisdir = os .path .dirname (os .path .abspath (__file__ ))
590590 topdir = os .path .dirname (os .path .dirname (thisdir ))
591591 testsdir = os .path .join (topdir , "tests" )
@@ -594,5 +594,5 @@ def save_xml_file(self, tgtpath: str) -> None:
594594 pm = ParseManager (id115dir , "kendra115" , id115dir )
595595 pm .initialize_paths ()
596596 for f in ["id115.c" , "id116.c" , "id117.c" , "id118.c" ]:
597- ifilename = pm .preprocess_file_with_gcc (f )
597+ ifilename = pm .preprocess_file_with_cc (f )
598598 pm .parse_ifile (ifilename )
0 commit comments