pointer-aliasing
What's the duration of "pointer not aliased by any other pointer" implication?
Currently Visual C++ is shipped with run开发者_如何转开发time where malloc() is decorated with __declspec( restrict ).[详细]
2023-04-06 18:07 分类:问答gcc C/C++ assume no pointer aliasing
Having recently read that the main reason why fo开发者_运维技巧rtran is faster than c/c++ in numerical computations is because there is no pointer aliasing.[详细]
2023-04-02 12:40 分类:问答Array pointer aliasing - undefined behavior?
Does the following code invoke undefined behavior (due to aliasing violation or otherwise)? int foo(int (*a)[10], int (*b)[5])[详细]
2023-03-28 16:05 分类:问答Java Collections & aliasing
开发者_JAVA技巧How do you deal with aliasing in Java? A simple solution is to make a copy of let\'s say an ArrayList but when i try to write the code my data keeps being overwritten by newly added dat[详细]
2023-02-20 08:20 分类:问答Messing around with Aliasing
I have the following code that works as expected: a = [1, 2, 3, 4] b = a >>> b is a True if I change it up a little it still works:[详细]
2023-02-16 06:29 分类:问答Is there anything like a restrict keyword for C++ to indicate that _iterators_ are not aliased
g++ does implement __restrict__ for pointers, but I could not find anything about itera开发者_StackOverflow中文版tors. My overall intent is to encourage the compiler to vectorize stl loops.[详细]
2023-02-10 00:31 分类:问答Is the aliasing rule symmetric?
I had a discussion with someone on IRC and this question turned up. We are allowed by the Standard to change an object of type int by a char lvalue.[详细]
2023-02-06 13:06 分类:问答How to manage shared_ptr that points to internal data of already referenced object?
Suppose I have these classes: struct Engine { int engine_data; }; struct Car { shared_ptr<Engine> engine;[详细]
2023-01-30 06:23 分类:问答Placement-new vs gcc 4.4.3 strict-aliasing rules
I\'ve got some code that I\'ve been using successfully for some years to implement a \"variant-type object\"; that is, a C++ object that can hold a values of various types, but only uses (approximatel[详细]
2023-01-26 09:00 分类:问答pointer aliasing
what is the diffe开发者_运维知识库rence between \"Strict\", \"Typed\", \"Restricted\" and \"Disjointed\" aliasing?In \"Strict aliasing\", pointers don\'t alias if they are different types.[详细]
2022-12-12 16:46 分类:问答