summaryrefslogtreecommitdiff
path: root/contrib/filter_params.pl
blob: 22dae6cc561d973ac58f0803c8bd1b8527c53d59 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#!/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;
}