Bug 272336 - emulators/fs-uae: fixes build error on clang 16.
Summary: emulators/fs-uae: fixes build error on clang 16.
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Fernando Apesteguía
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-02 18:35 UTC by Remko Catersels
Modified: 2023-07-04 15:11 UTC (History)
1 user (show)

See Also:


Attachments
patch: fs-uae build fix on clang 16 (389 bytes, patch)
2023-07-02 18:35 UTC, Remko Catersels
sirdice: maintainer-approval+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Remko Catersels 2023-07-02 18:35:55 UTC
Created attachment 243152 [details]
patch: fs-uae build fix on clang 16

Fixes build errors due to clang 16 changes.

src/archivers/dms/crc_csum.cpp:61:2: error: ISO C++17 does not allow 'register' storage class specifier [-Wregister]
        register USHORT CRC = 0;
        ^~~~~~~~~
1 error generated.
Comment 1 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-03 06:44:27 UTC
^Triage: Please set the maintainer-approval attachment flag (to +) on patches for ports you maintain to signify approval.
--
Attachment -> Details -> maintainer-approval [+]

^Triage: Maintainer-feedback flag (+) not required unless requested (?) first.

Would it be possible to patch the 'register' keyword out instead of setting an older standard?

Thanks!
Comment 2 Remko Catersels 2023-07-03 15:35:35 UTC
Don't know, I just used the same solution as PR 271415, PR 271353 and PR 271424.
Comment 3 Remko Catersels 2023-07-03 21:01:37 UTC
>Would it be possible to patch the 'register' keyword out instead of setting an older standard?

Had a quick try, patched out two but there's loads more in other parts of the code. Fix one of those and a few more show up. The USE_CXXSTD seems the cleanest and simplest solution.

I had seen another solution in bug #271870
CPPFLAGS+=	-Dregister=

That does fix the issue here too. But it looks a bit dodgy. Let me know which solution you prefer and I'll change it.
Comment 4 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-04 06:26:38 UTC
(In reply to sirdice from comment #3)
OK, let's go for the one that is attached. Thanks for double checking.
Comment 5 Fernando Apesteguía freebsd_committer freebsd_triage 2023-07-04 15:11:06 UTC
Committed,

Thanks!
Comment 6 commit-hook freebsd_committer freebsd_triage 2023-07-04 15:11:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a4987a77fce51447c3fe026d2c297570ee206d04

commit a4987a77fce51447c3fe026d2c297570ee206d04
Author:     Fernando Apesteguía <fernape@FreeBSD.org>
AuthorDate: 2023-07-03 06:46:21 +0000
Commit:     Fernando Apesteguía <fernape@FreeBSD.org>
CommitDate: 2023-07-04 15:10:43 +0000

    emulators/fs-uae: fixes build error on clang 16.

    PR:             272336
    Reported by:    sirdice@gmail.com (maintainer)

 emulators/fs-uae/Makefile | 1 +
 1 file changed, 1 insertion(+)