RFC: Avoiding #warning (C/C++ preprocessor extension)
nicolasg at snafu.de
Mon Oct 31 22:12:23 GMT 2005
On Monday 31 October 2005 22:42, Adriaan de Groot wrote:
> On Monday 31 October 2005 21:26, Nicolas Goutte wrote:
> > On Monday 31 October 2005 00:13, Jaroslaw Staniek wrote:
> > > Olivier Goffart said the following, On 2005-10-31 00:16:
> > > > All of this is correct.
> > > > Anyway, #warning are just temporary code, and they should be removed
> > > > before the release.
> > > > A good code compiles without warnings at all.
> > > >
> > > > We should not simply remove the #warning line, but also fix the
> > > > code.
> > >
> > > Yes, so I asked about a way to replace #warning with something similar
> > > but allowing the code to compile.
> The issue is that @todo's are much easier to ignore than #warnings. You
> don't see the @todo _at all_ unless you either (a) grep for them (b) look
> on EBN (c) generate apidox yourself.
> > > > This is a bit different: @todo are placed in header, and not directly
> > > > in the code they show.
> > >
> > > Could there be a problem with placing them directly in the code? We're
> > > already using doxygen in the code, in particular, @internal
> > If it has not changed in the meantime, only headers are parsed for the
> > on-line Doxygen documentation.
> > If it is not there as @todo, it is not much of an alternative.
> Doxygen processes *.h, *.cc, *.cpp and more; this is not an issue (for
Sure, the issue is more speed and the size of the resulting files I suppose.
(Similar to the problem that you cannot process together all files of one
module, because it takes much time and much memory. (even if that would be so
useful in complex modules like KOffice.))
> instance, for internal dox you can put them in the .cpp file). Running the
> following (stick it in a C++ file) through Doxygen does generate a sensible
> todo entry:
Have a nice day!
More information about the kde-core-devel