Hi, everybody. I am a newbie in llvm development. I found some strange behaviour in llvm-mc. Files without empty string at the eof doesn't proceed properly. llvm-mc prints something like this: <stdin>:5:18: error: unexpected token in argument list It looks like a bug. At least we should print: <stdin>:5:18: error: no newline at the end of file! If yes, I create it in bugzilla and assign to myself. Thank you. P.S.: I attached file without newline at eof. Try to run "llvm-mc -triple=armv7-apple-darwin -show-encoding < test.s" -- Truly yours -------------- next part -------------- A non-text attachment was scrubbed... Name: test.s Type: application/octet-stream Size: 58 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110906/b260cc63/attachment.obj>
A friendlier error message in that situation is definitely a good thing. -Jim On Sep 5, 2011, at 1:34 PM, Степан wrote:> Hi, everybody. > > I am a newbie in llvm development. I found some strange behaviour in llvm-mc. Files without empty string at the eof doesn't proceed properly. > > llvm-mc prints something like this: > <stdin>:5:18: error: unexpected token in argument list > > It looks like a bug. > > At least we should print: > <stdin>:5:18: error: no newline at the end of file! > > If yes, I create it in bugzilla and assign to myself. > > Thank you. > > P.S.: > I attached file without newline at eof. > Try to run "llvm-mc -triple=armv7-apple-darwin -show-encoding < test.s" > > -- > Truly yours<test.s>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
I created a bug (#10869: http://llvm.org/bugs/show_bug.cgi?id=10869) and I made the next patch for it: http://llvm.org/bugs/attachment.cgi?id=7235 By know it doesn't write any warnings, because AsmLexer cant send the warnings. llvm-mc just parses this type of files properly without any messages. Is it OK? What about lexer-side-warnings? If you need I can implement it. -- Truly yours, Stepan Dyatkovskiy 07.09.2011, 02:19, "Jim Grosbach" <grosbach at apple.com>:> A friendlier error message in that situation is definitely a good thing. > > -Jim > > On Sep 5, 2011, at 1:34 PM, Степан wrote: > >> Hi, everybody. >> >> I am a newbie in llvm development. I found some strange behaviour in llvm-mc. Files without empty string at the eof doesn't proceed properly. >> >> llvm-mc prints something like this: >> <stdin>:5:18: error: unexpected token in argument list >> >> It looks like a bug. >> >> At least we should print: >> <stdin>:5:18: error: no newline at the end of file! >> >> If yes, I create it in bugzilla and assign to myself. >> >> Thank you. >> >> P.S.: >> I attached file without newline at eof. >> Try to run "llvm-mc -triple=armv7-apple-darwin -show-encoding < test.s" >> >> -- >> Truly yours<test.s>_______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Apparently Analagous Threads
- [LLVMdev] llvm-mc, files without newline at eof
- [Bug 1189] New: Include of a file not robust to missing newline at EOF
- [klibc:update-dash] [PARSER] Simplify EOF/newline handling in list parser
- [klibc:update-dash] dash: [PARSER] Simplify EOF/newline handling in list parser
- [LLVMdev] Increase the flexibility of the AsmLexer in parsing identifiers.