[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip / qa] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: firefox_dGZEC2UZs8.png (54 KB, 1664x475)
54 KB
54 KB PNG
>>
>>100177653
auto& b = ...;

will give you the same address :)
returning reference to stack variable is undefined variable so dont do that because the value might get overwritten!!
>>
File: firefox_OvawRxHwkN.png (49 KB, 1659x406)
49 KB
49 KB PNG
>>100177743
wtf i used the wrong screencap for the thread its so over... but why doesnt the compiler yell at me?
>>
>>100177808
try with -fanalyzer
for more complex cases that can't be statically checked consider address sanitizer which checks things at runtime!
hope this helps!!
>>
>>100177808
>but why doesnt the compiler yell at me?
that's the job of static analysis tool



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.