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 638683 - Bad formatting of bitfield in struct variable.
Bad formatting of bitfield in struct variable.
Status: RESOLVED INCOMPLETE
Product: doxygen
Classification: Other
Component: general
1.7.3
Other Windows
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2011-01-04 18:09 UTC by Thad Smith
Modified: 2011-05-01 20:59 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thad Smith 2011-01-04 18:09:46 UTC
Code:

static struct {         /* Pin transmit current state */
    unsigned pinTxEnabled:1;        /* pin transmit feature enabled     */
    unsigned cdCodeEF:1;            /* Clear/enter output code = oxe/oxf,
                                    ** else oxa/oxb                     */
    Pin_pinDef_t    pinDef;         /* pin definition */
    Pin_Feedback_t  fb;             /* user feedback */
} pts;

Doxygen output:

Variables</h2></td></tr>
<tr><td class="memItemLeft" >struct {</td></tr>
<tr><td class="memItemLeft" >&#160;&#160;&#160;L&#160;&#160;&#160;<a class="el" href="pin_transmit_8c.html#a95ac8660946b04e9948764d7f6bb532a">__pad0__</a>:/Artemis/code/hid-dev-embedded/Generic/keypad/pinTransmit.c&quot; 2&quot;L:/Artemis/code/hid-dev-embedded/Generic/keypad/pinTransmit.c&quot; 2 unsigned pinTxEnabled:1</td></tr>
<tr><td class="memItemLeft" >&#160;&#160;&#160;unsigned&#160;&#160;&#160;<a class="el" href="pin_transmit_8c.html#aa6383a5418920aa4a19933bf8659535c">cdCodeEF</a>:1</td></tr>
<tr><td class="memItemLeft" >&#160;&#160;&#160;Pin_pinDef_t&#160;&#160;&#160;<a class="el" href="pin_transmit_8c.html#af08d3e65e89c4461a558b89b545e22e9">pinDef</a></td></tr>
<tr><td class="memItemLeft" >&#160;&#160;&#160;Pin_Feedback_t&#160;&#160;&#160;<a class="el" href="pin_transmit_8c.html#a945369629abbc118c1f26c997fe677a7">fb</a></td></tr>
<tr><td class="memItemLeft" valign="top">}&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="pin_transmit_8c.html#a50451486b81a8f1f7ecccdbf827a97f7">pts</a></td></tr>

Visual text:

Variables
struct {	
   L   __pad0__:/Artemis/code/hid-dev-embedded/Generic/keypad/pinTransmit.c" 2"L:/Artemis/code/hid-dev-embedded/Generic/keypad/pinTransmit.c" 2 unsigned pinTxEnabled:1

   unsigned   cdCodeEF:1

   Pin_pinDef_t   pinDef

   Pin_Feedback_t   fb

} 	pts

Notice the additional info shown for the first element.  The actual item is outside the box in the HTML version.

Also the variable name, pts, is shown in this copy and paste, it is invisible when the output is viewed with IE 6.0.
Comment 1 Dimitri van Heesch 2011-01-04 18:46:04 UTC
I have not been able to reproduce the problem with the code snippet you provided. Can you please attach a self-contained example (source+config file in a tar or zip) that allows me to reproduce the problem?
Comment 2 Thad Smith 2011-01-04 21:22:02 UTC
I cannot send the full source tree for proprietary reasons.  The bug is not determined exclusively by the contents of the .c source file.  When I add a second source file with a different name, but exact same contents, the original one manifests the error, while the copy doesn't (with both included in the run).  If I restrict the file list to only the copy, tough, it manifests the error as well.

Other points:
1. The failure is affected by #include files.  If I replace an #include <typedefs.h> with contents of typedefs.h (using #if 0 #else control in the .c file), then the output is formatted properly.

2. There is an interaction between two different include files.  typedefs.h includes others, including one which define the typedef unsigned char u1.
The second include file has typedef u1 Pin_pinDef_t (referencing the first typedef).  If I copy _either_ include file contents inline instead of including the associated .h file, the bug goes away.

3. The __pad0__ symbol in the output might be a clue.  I didn't find it in my source directory.

Unfortunately I don't have any more time to try to reproduce this.
Comment 3 Arihiro Yoshida 2011-01-17 04:30:03 UTC
I reported a similar problem as "Bug 639716",
with the minimal set of source codes that can reproduce the bug.
Comment 4 Tobias Mueller 2011-05-01 20:59:18 UTC
Closing this bug report as no further information has been provided. Please feel free to reopen this bug if you can provide the information asked for.
Thanks!