Closed nixpanic closed 4 years ago
Just curious: Have you tried constexpr
instead of const
?
On Mon, Apr 20, 2020 at 02:05:32AM -0700, Benedikt Ziemons wrote:
Just curious: Have you tried
constexpr
instead ofconst
?
No, and I have never seen constexpr
before. Searching for that
suggests it is a C++ feature, so it would not be useable for C programs.
I used constexpr a lot in C++ in recent years because in contrast to define it is subject to type checking, but I'm also not aware that this is a feature available in C. Modern C++ is a much more potent and (when used correctly) arguably even less error prone language than plane old C, but I have no plans to reimplement archivemount since I never really used it myself and therefore it is in maintenance mode for years, living from contributions only.
Von: Niels de Vos notifications@github.com Gesendet: Montag, 20. April 2020 11:52 An: cybernoid/archivemount Cc: Subscribed Betreff: Re: [cybernoid/archivemount] fix compile error with gcc-9.2.1 (#12)
On Mon, Apr 20, 2020 at 02:05:32AM -0700, Benedikt Ziemons wrote:
Just curious: Have you tried
constexpr
instead ofconst
?
No, and I have never seen constexpr
before. Searching for that
suggests it is a C++ feature, so it would not be useable for C programs.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.
Pardon me, you are absolutely right. For some reason I was assuming this was a C++ project when I wrote that, ignoring all the signs of it being a C project :)
Fedora Rawhide (upcoming Fedora 33) has gcc-9.2.1 which causes compiling archivemount to fail with the following error:
The 'delim' integer constant for the switch statement should be a compile time constant, so either hard-coded or #define'd.