[Issue 22899] New: importC: extra parentheses in sizeof don't give an error with typedef types
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Fri Mar 18 10:56:40 UTC 2022
https://issues.dlang.org/show_bug.cgi?id=22899
Issue ID: 22899
Summary: importC: extra parentheses in sizeof don't give an
error with typedef types
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Keywords: accepts-invalid, ImportC
Severity: normal
Priority: P1
Component: dmd
Assignee: nobody at puremagic.com
Reporter: duser at neet.fi
typedef int mytype_t;
void fn()
{
int x;
x = sizeof( (mytype_t) ); // no error
x = sizeof( (int) ); // ok: Error: expression expected, not `int`
}
autoconf configure scripts rely on this being an error when determining if a
type is supported:
https://github.com/autotools-mirror/autoconf/blob/64df9b4/lib/autoconf/types.m4#L65
--
More information about the Digitalmars-d-bugs
mailing list