After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595935 - New include handling policy issues warnings
New include handling policy issues warnings
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.1
Other All
: Normal minor
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2009-09-22 11:00 UTC by Luca Ottaviano
Modified: 2009-12-30 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Minimal project that shows the problem (129.87 KB, application/zip)
2009-09-22 11:00 UTC, Luca Ottaviano
Details
Another test case with a PREDEFINED added (129.91 KB, application/zip)
2009-09-22 12:36 UTC, Luca Ottaviano
Details

Description Luca Ottaviano 2009-09-22 11:00:44 UTC
Created attachment 143683 [details]
Minimal project that shows the problem

The attached sample project issues some warnings about undefined macros. The
full project is BeRTOS documentation, which can be downloaded from
http://download.bertos.org/release/bertos.tar.bz2

Possibly a regression from 1.5.8.

In the full project the following compilation warnings are issued:
src/bertos/bertos/cfg/macros.h:225: Warning: documentation for unknown
define BIT_CHANGE found.

src/bertos/bertos/cfg/macros.h:264: Warning: documentation for unknown
define BIT_CHANGE_BV found.

src/bertos/bertos/cfg/macros.h:327: Warning: documentation for unknown
define ROTR found.

src/bertos/bertos/cfg/macros.h:339: Warning: documentation for unknown
define MAKE_ID found.

While the first two are inside a #if/#endif block and I'm looking for a
workaround (like PREDEFINES or such), the latter 2 are plain macros
defined like this:

/**
 * ROTR documentation here
 */
#define ROTR [something]

The problem is, version 1.5.8 on Ubuntu 9.10 doesn't complain at all and
correctly generates documentation for the last 2 macros; also, if I
*rename* the file cfg/macros.h to cfg/asdf.h, no warning is issued and
documentation is generated as expected even with version 1.6.1.

The original project has empty INPUT field. Changing it to:
INPUT = bertos/cfg/macros.h bertos/
fixes the problem.

Tested on Linux and Windows.
Comment 1 Luca Ottaviano 2009-09-22 12:36:36 UTC
Created attachment 143690 [details]
Another test case with a PREDEFINED added
Comment 2 Luca Ottaviano 2009-09-22 12:38:07 UTC
When adding to PREDEFINED the macro COMPILER_VARIADIC_MACROS to generate documentation for BIT_CHANGE and BIT_CHANGE_BV the warnings appear again and the INPUT trick doesn't work.
Comment 3 Dimitri van Heesch 2009-09-27 10:15:07 UTC
Turns out this had nothing to do with the new include handling policy, but with a macro containing an empty C style comment, e.g.:

#define BIT_MASK_SINGLE__(use_bv, index, max, arg) \
           ((index < max) ? (PP_CAT(BIT_EXTRACT_FLAG_, use_bv) arg) : 0) \
                /**/

If you remove the /**/ or replace it by /* */ it should work again. Doxygen was treating /** as the start of a special comment and then looked for the */ which might never come.

I'll fix the preprocessor's matching rules for this case.
Comment 4 Luca Ottaviano 2009-09-28 07:30:49 UTC
Thanks, it works.

Feel free to close the bug when proper rules are implemented.
Comment 5 Dimitri van Heesch 2009-12-30 13:38:52 UTC
This bug was previously marked ASSIGNED, which means it should be fixed in
doxygen version 1.6.2. Please verify if this is indeed the case and reopen the
bug if you think it is not fixed (include any additional information that you
think can be relevant).