Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / mk / help / c.help
blob6064fe14af66b1d232c952f70f9f8c13554e954c
1 # $NetBSD: c.help,v 1.1 2008/01/06 19:13:31 rillig Exp $
3 # This file contains typical error messages from C++ compilers and
4 # instructions how to fix them properly.
6 # === Invalid lvalue in increment ===
8 # Once upon a time, it was possible to say "((int)foo)++", which treats
9 # foo as if it has type "int", and increments it. With gcc4,
10 # this no longer works, and now you have to say "foo = (int)foo + 1".
11 # This is because a type cast now results only in an rvalue (which is an
12 # expression that doesn't have a location in memory), not in an lvalue
13 # (which is an expression that does have a location).
15 # This becomes more complicated in macros that access datastructures,
16 # which involves much pointer arithmetics. A popular example is obstack,
17 # a collection of "object stack macros". A patch for fixing that is in
18 # devel/coconut/patches/patch-ab revision 1.1.
20 # Keywords: C lvalue increment obstack obstack_ptr_grow
22 # === The __STDC__ macro ===
24 # If this macro is defined to 1, the C compiler implements
25 # ISO/IEC 9899:1990 (also known as C90), or a later version of that
26 # standard.
28 # When using the Sun C compiler, there are three possibilities for the
29 # __STDC__ macro:
31 # 1. In K&R mode (-Xt), __STDC__ is undefined.
32 # 2. In default mode (-Xa), __STDC__ is defined and has the value 0.
33 # 3. In conformance mode (-Xc), __STDC__ is defined and has the value 1.
35 # Keywords: __STDC__