Review Request: Add #pragma once to headers generated by "New Class" wizard
Valentyn Pavliuchenko
valentyn.pavliuchenko at gmail.com
Fri Jan 21 21:13:20 UTC 2011
> On Jan. 21, 2011, 9:02 p.m., Aleix Pol Gonzalez wrote:
> > #pragma once is not a standard and it's not really an improvement in GCC (safe guards are already optimized).
> > Also it's not in the C++ standard.
> >
> > I don't think this should go in.
pragma once is already implemented by all popular compilers. If we're not writing a portable code then it's even better than include guards.
About optimizations - yes, GCC already does this, but GCC is not the only existing compiler, so pragma once will be good for really portable projects.
I think there's nothing bad in having pragma once in addition to include guards.
- Valentyn
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/100432/#review1016
-----------------------------------------------------------
On Jan. 21, 2011, 8:28 p.m., Valentyn Pavliuchenko wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/100432/
> -----------------------------------------------------------
>
> (Updated Jan. 21, 2011, 8:28 p.m.)
>
>
> Review request for KDevelop.
>
>
> Summary
> -------
>
> Add #pragma once to headers generated by "New Class" wizard in addition to include guards.
>
>
> This addresses bug 263913.
> http://bugs.kde.org/show_bug.cgi?id=263913
>
>
> Diffs
> -----
>
> languages/cpp/codegen/cppnewclass.cpp 8bc82af
>
> Diff: http://git.reviewboard.kde.org/r/100432/diff
>
>
> Testing
> -------
>
> Manual testing done.
>
>
> Thanks,
>
> Valentyn
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20110121/134c4f28/attachment.html>
More information about the KDevelop-devel
mailing list