summaryrefslogtreecommitdiff
path: root/gcc/genautomata.c
diff options
context:
space:
mode:
authoramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 17:16:38 +0000
committeramylaar <amylaar@138bc75d-0d04-0410-961f-82ee72b054a4>2010-07-12 17:16:38 +0000
commit541be8d3ef57c7d99c9f2a06a716e62dd70881e4 (patch)
treeac7e15a993d22e1e844178afcd934084e6ee7303 /gcc/genautomata.c
parente8bb94d40702716d7fca6a847741deb0eb90cf57 (diff)
downloadgcc-541be8d3ef57c7d99c9f2a06a716e62dd70881e4.tar.gz
PR rtl-optimization/44752
* genautomata.c (main): Don't emit an empty file even if there is no automaton. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@162083 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/genautomata.c')
-rw-r--r--gcc/genautomata.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/genautomata.c b/gcc/genautomata.c
index da7ec65e40c..821ec9e0c2f 100644
--- a/gcc/genautomata.c
+++ b/gcc/genautomata.c
@@ -9568,6 +9568,16 @@ main (int argc, char **argv)
write_automata ();
}
}
+ else
+ {
+ puts ("/* Generated automatically by the program `genautomata'\n"
+ " from the machine description file `md'. */\n\n"
+ "/* There is no automaton, but ISO C forbids empty\n"
+ " translation units, so include a header file with some\n"
+ " declarations, and the its pre-requisite header file. */\n"
+ "#include \"config.h\"\n"
+ "#include \"system.h\"\n");
+ }
fflush (stdout);
return (ferror (stdout) != 0 || have_error