Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Mar 2020 21:34:56 +0000
From:      bugzilla-noreply@freebsd.org
To:        toolchain@FreeBSD.org
Subject:   [Bug 245006] toolchain: clang issues bogus "warning: multi-line // comment [-Wcomment]" under -pedantic
Message-ID:  <bug-245006-29464-ujC2Snsg0O@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-245006-29464@https.bugs.freebsd.org/bugzilla/>
References:  <bug-245006-29464@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=3D245006

Matthias Andree <mandree@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.llvm.org/show_
                   |                            |bug.cgi?id=3D45285
            Summary|toolchain: clang issues     |toolchain: clang issues
                   |bogus "warning: multi-line  |bogus "warning: multi-line
                   |// comment [-Wcomment]"     |// comment [-Wcomment]"
                   |                            |under -pedantic

--- Comment #4 from Matthias Andree <mandree@FreeBSD.org> ---
After some digging, I figured that -pedantic -std=3Dc11 makes the differenc=
e.=20
All GCC version I've tried (9.2.0, 10.0 snapshot) accept the code without
diagnostics.=20

-pedantic interpretation differs. clang flags extensions, and gcc enables a=
ll
diagnostics required by the standard.


gcc -O -std=3Dc11 -pedantic-errors  -c /tmp/try.c=20
gcc10 -O -std=3Dc11 -pedantic-errors  -c /tmp/try.c=20
(no output)

clang -O -std=3Dc11 -pedantic-errors  -c /tmp/try.c=20
/tmp/try.c:1:4: error: multi-line // comment [-Werror,-Wcomment]

same for base clang and all clang versions from ports:
llvm-devel-11.0.d20200117      LLVM and Clang
llvm10-10.0.0.r4               LLVM and Clang
llvm80-8.0.1_3                 LLVM and Clang
llvm90-9.0.1                   LLVM and Clang

I've filed this with LLVM, link in See Also. Let's see what we get.

--=20
You are receiving this mail because:
You are on the CC list for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245006-29464-ujC2Snsg0O>