https://bugs.llvm.org/show_bug.cgi?id=42227

            Bug ID: 42227
           Summary: No warning for incomplete type
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangb...@nondot.org
          Reporter: zhong...@pku.org.cn
                CC: blitzrak...@gmail.com, dgre...@apple.com,
                    erik.pilking...@gmail.com, llvm-bugs@lists.llvm.org,
                    richard-l...@metafoo.co.uk

My clang is 9.0.0, and the code is:

enum E { a, b = true ? 1 : ((E)a, 0) };

gcc rejects it:

<source>:1:32: error: conversion to incomplete type

    1 | enum E { a, b = true ? 1 : ((E)a, 0) };

      |                                ^

Compiler returned: 1

clang accepts it, although the type is incomplete.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to