Clarification for 7–5–1 - Printable Version +- MISRA Discussion Forums (https://forum.misra.org.uk) +-- Forum: MISRA C++ (https://forum.misra.org.uk/forumdisplay.php?fid=18) +--- Forum: MISRA C++:2008 rules (https://forum.misra.org.uk/forumdisplay.php?fid=19) +---- Forum: 6.7 Declarations (C++) (https://forum.misra.org.uk/forumdisplay.php?fid=136) +---- Thread: Clarification for 7–5–1 (/showthread.php?tid=607) |
Clarification for 7–5–1 - pkruk - 12-01-2009 Quote:A function shall not return a reference or a pointer to an automatic variable (including parameters), defined within the function. I have a question about reference types. Is the following code compliant or not? Code: int global_var; Re: Clarification for 7–5–1 - misra cpp - 05-10-2015 In foo() and bar():
|