homenc / HElib

HElib is an open-source software library that implements homomorphic encryption. It supports the BGV scheme with bootstrapping and the Approximate Number CKKS scheme. HElib also includes optimizations for efficient homomorphic evaluation, focusing on effective use of ciphertext packing techniques and on the Gentry-Halevi-Smart optimizations.
https://homenc.github.io/HElib
Other
3.16k stars 761 forks source link

reserved identifier violation #192

Open elfring opened 6 years ago

elfring commented 6 years ago

I would like to point out that identifiers like “_CModulus_H_” and “_FHE_H_do not fit to the expected naming convention of the C++ language standard. Would you like to adjust your selection for unique names?

shaih commented 6 years ago

Hi Markus, can you elaborate on what you mean by the "expected naming convention of the C++ language standard"? These macros are never used anywhere other than for replacing 'pragma once', so I really don't care how they are called. If there is a good reason to change them, then by all means go ahead and do it.

elfring commented 6 years ago

How do you think about to avoid that this software depends on undefined behaviour?

shaih commented 6 years ago

Again, please explain.

elfring commented 6 years ago

I suggest to take another look at the usage of reserved identifiers.

victorshoup commented 6 years ago

Hi Shai,

The point is, compilers are free to, for example, #define anything of the form _[A-Z]. and .__.* So one should not use this. I break this rule myself and have yet to get bitten by it.

-Victor

On Mar 10, 2018, at 11:19 AM, Shai Halevi notifications@github.com wrote:

Again, please explain.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

elfring commented 6 years ago

How are the chances to improve standard compliance?