Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Systems Programming Optimizations #149

Open
bhuvy2 opened this issue Aug 2, 2019 · 0 comments
Open

Include Systems Programming Optimizations #149

bhuvy2 opened this issue Aug 2, 2019 · 0 comments
Labels
content Dealing with the actual content of the wikibook extension Currently not covered in the wikibook

Comments

@bhuvy2
Copy link
Collaborator

bhuvy2 commented Aug 2, 2019

Is your feature request related to a problem? Please describe.
As described in a reddit comment, we rely on non-standard and ambiguous behavior regularly. We should make note of that.

Describe the solution you'd like

  1. The standard is inconsistent in a few places. When choosing between general and specific, compilers choose the most specific rule and when choosing between defined and undefined behavior, they’ll choose defined.
  2. Non-Standard has many examples
  • Absolute ordering of pointers in the case of malloc
  • Pointer equality under different types
  • Zero Length Arrays
  • Callee Detection
  • Constant Propagation
  • Function Attributes
  • Placement of variables in data sections (non portable)
  • Variadic Macros
  • Variable Length Arrays
  • Compound literals for PTHREAD_MUTEX_INITIALIZER
    -noreturn is used in abort() and exit()
  • Alignment
  • Volatile Access for pthreads
  • inline asm for memory barriers, mutex, system calls, etc etc
  • Builtin Atomic Functions
  • Thread local variables in errno

Describe alternatives you've considered
N/A

Additional context
N/A

@bhuvy2 bhuvy2 added extension Currently not covered in the wikibook content Dealing with the actual content of the wikibook labels Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content Dealing with the actual content of the wikibook extension Currently not covered in the wikibook
Projects
None yet
Development

No branches or pull requests

1 participant