You're right - I thought it was deprecated in C++14, but it was deprecated in C++11. It's removed in C++17, but it doesn't stop the compilers still accepting it - they're just required to start complaining because it's not valid C++17. Contributor Author JojoS62 commented Jan 10, ...
I'm a foreigner reading C99, while a sentence (in 6.7.1) makes me confused: '(A declaration of an identifier for an object with storage-class specifier register suggests that access to the object be as fast as possible.)The extent to which such suggestions are effective is implementation-d...
2) The register specifier is only allowed for objects declared at block scope, including functio...
C Storage Classes Storage-Class Specifiers for External-Level Declarations Storage-Class Specifiers for Internal-Level Declarations Storage-Class Specifiers for Internal-Level Declarations auto Storage-Class Specifier register Storage-Class Specifier static Storage-Class Specifier extern Storage-Class Specifier St...
Unlike C, C++ lets you take the address of an object with theregisterstorage class. For example: register int i; int* b = &i; // valid in C++, but not in C Storage duration of register variables Objects with theregisterstorage class specifier have automatic storage duration. Each time ...
basic_fun.cpp:4063:11: warning: 'register' storage class specifier is deprecated and incompatible with C++1z [-Wdeprecated-register] ELEM_SWAP(array[ll], array[hh]) ^ /Users/travis/build/slayoo/gdl/src/basic_fun.cpp:4026:26: note: expand...
"If the reason for using "register" is a time critical function, C should not have been used anyhow." What other possible reason could there be? Quoting from the previously quoted section of the standard: "A declaration of an identifier for an object with storage-class specifier register sug...
in and float are of same size) ? First, when you declare any variable as a register variable it does not guarantee the variable will be placed in a register. The C standard indicates: A declaration of an identifier for an object with storage-class specifier register suggests that access to...
Do you see this problem only with mscgen_lexer.cpp / mscgen_lexer.l or also with other .l files and or .cpp / .c files? You wrote about -Wno-deprecated but in my comment (Building failure: ISO C++17 does not allow 'register' storage class specifier [-Wregister] #10649 (comment))...