aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.4.0/contrib/filter_params.pl
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.4.0/contrib/filter_params.pl')
-rwxr-xr-xgcc-4.4.0/contrib/filter_params.pl14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.4.0/contrib/filter_params.pl b/gcc-4.4.0/contrib/filter_params.pl
new file mode 100755
index 000000000..22dae6cc5
--- /dev/null
+++ b/gcc-4.4.0/contrib/filter_params.pl
@@ -0,0 +1,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;
+}