Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 30 Jan 2017 01:12:55 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 216590] clang 3.9.1 from (e.g.) head -r312942 fails to reject or even warn about some forms of assignments to const fields
Message-ID:  <bug-216590-8@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=216590

            Bug ID: 216590
           Summary: clang 3.9.1 from (e.g.) head -r312942 fails to reject
                    or even warn about some forms of assignments to const
                    fields
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs@FreeBSD.org
          Reporter: markmi@dsl-only.net

clang 3.9.1 in FreeBSD allows the
following to compile without
complaint, even with -Wpedantic :

struct mlx5_core_diagnostics_entry {
    const char           *const desc;
          unsigned short        counter_id;
} empty;

int main ()
{
    struct mlx5_core_diagnostics_entry test;
    test = empty;
}

amd64-gcc, by contrast, rejects the assignment
as an error.

-- 
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-216590-8>