LWN.net Logo

A look at C++14, part 1

A look at C++14, part 1

Posted Mar 28, 2013 21:10 UTC (Thu) by lynxlynxlynx (guest, #90121)
Parent article: A look at C++14, part 1

Anyone else noticed the syntax error in the sed line? I doubt a compiler could catch that bug, so it seems like a disaster waiting to happen.


(Log in to post comments)

A look at C++14, part 1

Posted Mar 28, 2013 21:45 UTC (Thu) by FranTaylor (guest, #80190) [Link]

gcc catches problems with static printf strings, why not?

A look at C++14, part 1

Posted Mar 28, 2013 21:47 UTC (Thu) by FranTaylor (guest, #80190) [Link]

and besides, that error will simply explode and cause sed to return -1, which will explode in the developer's face the first time they test their code (developers test their own code in your reality, yes?)

A look at C++14, part 1

Posted Mar 28, 2013 23:42 UTC (Thu) by lynxlynxlynx (guest, #90121) [Link]

Assuming good coverage and excellent sanity checking if the pipes get contructed following user input.

printf syntax is trivial when compared to shell intricacies. Think of all the possible extra expansion and quoting problems this could cause. But yeah, that's mostly for the developer to worry about.

A look at C++14, part 1

Posted Apr 1, 2013 20:49 UTC (Mon) by mathstuf (subscriber, #69389) [Link]

> (developers test their own code in your reality, yes?)

Maybe[1] :) .

[1]http://www.r6.ca/blog/20120708T122219Z.html

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds