[Bug c/91820] New: missing error diagnosis of '&' in initialization
tangyixuan at mail dot dlut.edu.cn
gcc-bugzilla@gcc.gnu.org
Thu Sep 19 12:34:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91820
Bug ID: 91820
Summary: missing error diagnosis of '&' in initialization
Product: gcc
Version: 10.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
Assignee: unassigned at gcc dot gnu.org
Reporter: tangyixuan at mail dot dlut.edu.cn
Target Milestone: ---
GCC-trunk do not report the error diagnosis when there misses '&' in the
initialization. For example:
$: cat s.c
static volatile int * volatile * const a = (void*)0;
static volatile int * volatile * const *b = a;
int main (int argc, char* argv[])
{
if((void*)0 != b) printf("error");
}
$: ../gcc-7.4/bin/gcc s.c
s.c:2:45: error: Inilializer element is not constant
$: ../gcc-trunk/bin/gcc s.c
version of GCC:
gcc version 10.0.0 20190913 (experimental) (GCC)
gcc-7 can not generate an executable file but gcc-trunk can.
More information about the Gcc-bugs
mailing list