Check out my first novel, midnight's simulacra!

ISO C: Difference between revisions

From dankwiki
No edit summary
m (Dank moved page ISO C99 to ISO C18: There have been at least three revisions since C99, heh)
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
== [[GCC|gcc]] support ==
==Compilers==
* I'd like to [http://gcc.gnu.org/c99status.html further this along]
* Intel's [http://software.intel.com/en-us/intel-compilers/ C/C++ Compiler] (icc) is [http://software.intel.com/en-us/articles/non-commercial-software-download/ free for non-commercial development]
* AMD's [http://developer.amd.com/cpu/open64/pages/default.aspx Open64 Compiler Suite] is just plain free


== Threads ==
===[[GCC|gcc]]===
* I'd like to further along [http://gcc.gnu.org/c99status.html gcc C99 support]
 
==Threads==
* Hans Boehm's [http://www.hpl.hp.com/personal/Hans_Boehm/c++mm/ Threads and Memory Model for C++] page is awesome
* Hans Boehm's [http://www.hpl.hp.com/personal/Hans_Boehm/c++mm/ Threads and Memory Model for C++] page is awesome
==Aliasing==
* See [[Compiler Design]] page
* -O2 implies -fstrict-aliasing, at least as of gcc 4.3
* -Wstrict-aliasing=2 warns about many constructions unsafe to use with -fstrict-aliasing
** How to use Berkeley sockets API? See http://archives.free.net.ph/message/20080529.200047.b40321b6.fi.html, etc
==stdint.h==
An excellent addition in C99. Type constructions of the form u?int{variety}_t (u prefix denotes unsigned). Varieties include:
* <tt>ptr</tt>: Size sufficient to hold a pointer. This is useful for function type definitions, when it's unsure whether a pointer or integer type would be most appropriate for various instances (a <tt>void *</tt>'s size is not directly related to an <tt>int</tt>'s size by the ANSI C standard).
* <tt>max</tt>: Size sufficient to hold any other integer type.
* <tt>fast{8,16,32,64}</tt>: Fastest integer type having at least the specified width.
* <tt>least{8,16,32,64}</tt>: Minimum native integer type having at least the specified width.
* <tt>{8,16,32,64}</tt>: Integer type having precisely this width.

Revision as of 20:33, 3 August 2019

Compilers

gcc

Threads

Aliasing

stdint.h

An excellent addition in C99. Type constructions of the form u?int{variety}_t (u prefix denotes unsigned). Varieties include:

  • ptr: Size sufficient to hold a pointer. This is useful for function type definitions, when it's unsure whether a pointer or integer type would be most appropriate for various instances (a void *'s size is not directly related to an int's size by the ANSI C standard).
  • max: Size sufficient to hold any other integer type.
  • fast{8,16,32,64}: Fastest integer type having at least the specified width.
  • least{8,16,32,64}: Minimum native integer type having at least the specified width.
  • {8,16,32,64}: Integer type having precisely this width.