Retro68/gcc/contrib/filter_params.pl
Wolfgang Thaller aaf905ce07 add gcc 4.70
2012-03-28 01:13:14 +02:00

15 lines
392 B
Perl
Executable File

#!/usr/bin/perl
# Filters out some of the #defines used throughout the GCC sources:
# - GTY(()) marks declarations for gengtype.c
# - PARAMS(()) is used for K&R compatibility. See ansidecl.h.
while (<>) {
s/^\/\* /\/\*\* \@verbatim /;
s/\*\// \@endverbatim \*\//;
s/GTY[ \t]*\(\(.*\)\)//g;
s/[ \t]ATTRIBUTE_UNUSED//g;
s/PARAMS[ \t]*\(\((.*?)\)\)/\($1\)/sg;
print;
}