[PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

Sjoerd Meijer via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 17 05:33:51 PDT 2015


Agreed, let’s get that right first.
The attached patch causes the program to trap for all optimizations levels, except when optimizing for size.

Sjoerd.

From: dosreis at gmail.com [mailto:dosreis at gmail.com] On Behalf Of Gabriel Dos Reis
Sent: 13 August 2015 21:51
To: Richard Smith
Cc: Sjoerd Meijer; Marshall Clow; cfe-commits
Subject: Re: [PATCH] RE: [cfe-dev] missing return statement for non-void functions in C++

Please make such programs crash early and often.  They are a nightmare to maintain.  Make them blow in the face of the original authors; not after they are gone.

-- Gaby


-- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.

ARM Limited, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2557590
ARM Holdings plc, Registered office 110 Fulbourn Road, Cambridge CB1 9NJ, Registered in England & Wales, Company No: 2548782
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150817/74428aa3/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Always-trap-for-missing-return-statements-except-whe.patch
Type: application/octet-stream
Size: 1369 bytes
Desc: 0001-Always-trap-for-missing-return-statements-except-whe.patch
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150817/74428aa3/attachment.obj>


More information about the cfe-commits mailing list