Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 May 2024 19:56:50 +0000
From:      bugzilla-noreply@freebsd.org
To:        bugs@FreeBSD.org
Subject:   [Bug 279403] typedef redeclaration in base include becoming an issue for DTrace
Message-ID:  <bug-279403-227-d2pe713ArL@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-279403-227@https.bugs.freebsd.org/bugzilla/>
References:  <bug-279403-227@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D279403

Mark Johnston <markj@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |markj@FreeBSD.org
             Status|New                         |Open

--- Comment #1 from Mark Johnston <markj@FreeBSD.org> ---
Has this example ever worked on FreeBSD?

The problem isn't with duplicate typedefs; those are errors in C as well.

In dt_parser.c we have:

1451         /*=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
1452          * If we are nested inside of a C include file, add the
declaration to=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
1453          * the C definition module; otherwise use the D definition mod=
ule.=20
1454          */=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
1455         if (yypcb->pcb_idepth !=3D 0)=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
1456                 dmp =3D dtp->dt_cdefs;=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20
1457         else=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20
1458                 dmp =3D dtp->dt_ddefs;

When we hit the error, we're actually using ddefs instead of cdefs, which is
incorrect according to the comment.  How is pcb_idepth set?  It's adjusted =
when
we see line control directives emitted by the processor, but it looks like =
our
version of the D lexer isn't handling this properly somehow.

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-279403-227-d2pe713ArL>