summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoffrey Mainland <gmainlan@microsoft.com>2013-09-23 00:40:59 -0400
committerGeoffrey Mainland <gmainlan@microsoft.com>2013-09-23 00:44:42 -0400
commite19ae5df6c05e5fd3c691623e041b136dc5cafe9 (patch)
tree9e16812caa28deebadc6153008cda7f9755eeb3e
parent680441de191145dd874bd453e09e4ee906d87bbb (diff)
downloadhaskell-e19ae5df6c05e5fd3c691623e041b136dc5cafe9.tar.gz
Catch potential garbage after -msse.
-rw-r--r--compiler/main/CmdLineParser.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/main/CmdLineParser.hs b/compiler/main/CmdLineParser.hs
index fef2701bcd..22811d44cc 100644
--- a/compiler/main/CmdLineParser.hs
+++ b/compiler/main/CmdLineParser.hs
@@ -220,7 +220,8 @@ processOneArg opt_kind rest arg args
Just min <- parseInt min_s -> Right (f maj min, args)
| [maj_s] <- split '.' rest_no_eq,
Just maj <- parseInt maj_s -> Right (f maj 0, args)
- | otherwise -> Right (f 1 0, args)
+ | null rest_no_eq -> Right (f 1 0, args)
+ | otherwise -> Left ("malformed version argument in " ++ dash_arg)
findArg :: [Flag m] -> String -> Maybe (String, OptKind m)