diff options
author | Nathan Sidwell <nathan@acm.org> | 2018-04-30 11:47:04 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2018-04-30 11:47:04 +0000 |
commit | bd9918c41171a12b7fc05e9432808edbe6a2db55 (patch) | |
tree | bbe81a739c007828382a36d8df1193bad166d65a /gcc/dumpfile.c | |
parent | e693ebce815cd4d29cb0e438e61a692624423628 (diff) | |
download | gcc-bd9918c41171a12b7fc05e9432808edbe6a2db55.zip gcc-bd9918c41171a12b7fc05e9432808edbe6a2db55.tar.gz gcc-bd9918c41171a12b7fc05e9432808edbe6a2db55.tar.bz2 |
[patch] allow '-' for stdout dump
https://gcc.gnu.org/ml/gcc-patches/2018-04/msg01303.html
* dumpfile.c (dump_open): Allow '-' for stdout.
* doc/invoke.texi (Developer Options): Document dump filename
determination early. Document stdin/stdout selection.
Co-Authored-By: Sandra Loosemore <sandra@codesourcery.com>
From-SVN: r259760
Diffstat (limited to 'gcc/dumpfile.c')
-rw-r--r-- | gcc/dumpfile.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/dumpfile.c b/gcc/dumpfile.c index 75e2a7d..0f16d4f 100644 --- a/gcc/dumpfile.c +++ b/gcc/dumpfile.c @@ -323,7 +323,8 @@ dump_open (const char *filename, bool trunc) if (strcmp ("stderr", filename) == 0) return stderr; - if (strcmp ("stdout", filename) == 0) + if (strcmp ("stdout", filename) == 0 + || strcmp ("-", filename) == 0) return stdout; FILE *stream = fopen (filename, trunc ? "w" : "a"); |