~ubuntu-branches/ubuntu/wily/aspectc++/wily

« back to all changes in this revision

Viewing changes to Puma/TODO

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2009-06-15 10:17:02 UTC
  • mfrom: (1.2.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20090615101702-qsr30iptwbxylmo2
Tags: 1.0pre4~svn.20090615-1
* New upstream release.
* don't ignore errors in the postrm script
* avoid spurious creation of empty dir ./usr/sbin/
* improve short descriptions of libpuma-doc and libpuma-dev
* bump Standards-Version to 3.8.1
* bump debhelper compat level to level 7 (latest in stable)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
TODO
2
2
====
3
3
 
 
4
General
 
5
-------
 
6
 
4
7
* documentation
5
8
* parse way optimization
6
9
* implement member access control
10
13
* better management of different targets for size and alignment of types
11
14
* shared type objects => faster type comparison, less memory consumption...
12
15
* GNU C/C++ extensions:
13
 
  - statement expressions => e.g. ({ int i=0; i; })
14
 
  - omitted middle operand of `?:' expression: foo ? /*empty*/ : bar
15
 
    => if first operand is nonzero, the value is value of first operand
16
 
    (`x ? : y' has value of `x' if `x' nonzero; otherwise, the value of `y')
17
16
  - generalized lvalues => less restrictive isLvalue()
18
 
  - nested functions => skip scope check in fct_def rule
19
17
  - introduce variable name after initializer instead of before
20
 
* improve preprocessor
21
 
  - change macro expansion scheme to fit the standard, e.g.
22
 
    --- 
23
 
    #define hash_hash # ## #
24
 
    #define mkstr(a) # a 
25
 
    #define in_between(a) mkstr(a)
26
 
    #define join(c, d) in_between(c hash_hash d)
27
 
    join(x, y);
28
 
    ---
29
 
    should result in `"x ## y"' not in `" xy "'
30
 
  - GNU extensions, e.g.
31
 
    ---
32
 
    #define FILE(x) <a/b/x>
33
 
    #include FILE(bar.h)
34
 
    ---
35
 
    results in `#include <a/b/ bar.h >' but GNU's cpp produces 
36
 
    `#include <a/b/bar.h>'
 
18
 
 
19
 
 
20
Preprocessor
 
21
------------
 
22
- change macro expansion scheme to fit the standard, e.g.
 
23
  --- 
 
24
  #define hash_hash # ## #
 
25
  #define mkstr(a) # a 
 
26
  #define in_between(a) mkstr(a)
 
27
  #define join(c, d) in_between(c hash_hash d)
 
28
  join(x, y);
 
29
  ---
 
30
  should result in `"x ## y"' not in `" xy "'
 
31
- GNU extensions, e.g.
 
32
  ---
 
33
  #define FILE(x) <a/b/x>
 
34
  #include FILE(bar.h)
 
35
  ---
 
36
  results in `#include <a/b/ bar.h >' but GNU's cpp produces 
 
37
  `#include <a/b/bar.h>'
 
38
 
 
39
 
 
40
GNU Parser Extensions
 
41
---------------------
 
42
 
 
43
1. Thread-Local Storage
 
44
storage-class __thread
 
45
 
 
46
2. more built-in functions for C/C++
 
47
 
 
48
3. C/C++ offsetof
 
49
Calculation of real offset is not yet implemented.
 
50
Currently always returns 0.
 
51
 
 
52
4. __alignof__, with same syntax as for sizeof
 
53
Calculation of real alignment is not yet implemented.
 
54
Currently always returns 1.
 
55
 
 
56
5. Getting the Return or Frame Address of a Function
 
57
void * __builtin_return_address (unsigned int level);
 
58
void * __builtin_frame_address (unsigned int level);
 
59
 
 
60
6. Function Names as Strings
 
61
static const char __func__[] = "function-name";
 
62
__FUNCTION__ = __func__
 
63
__PRETTY_FUNCTION__ = void a::sub(int)
 
64
 
 
65
7. Case Ranges
 
66
switch (1) {
 
67
  case 1 ... 9: break;
 
68
}
 
69
 
 
70
8. Cast to a Union Type
 
71
union foo { int i; double d; };
 
72
int x;
 
73
double y;
 
74
union foo u;
 
75
u = (union foo) x;
 
76
u = (union foo) y;
 
77
 
 
78
9. Designated Initializers
 
79
int whitespace[256]
 
80
  = { [' '] = 1, ['\t'] = 1, ['\h'] = 1,
 
81
      ['\f'] = 1, ['\n'] = 1, ['\r'] = 1 };
 
82
struct point ptarray[10] = { [2].y = yv2, [2].x = xv2, [0].x = xv0 };
 
83
 
 
84
10. Compound Literals
 
85
structure = ((struct foo) {x + y, 'a', 0});
 
86
 
 
87
11. C: Non-Constant Initializers
 
88
void foo (float f, float g) {
 
89
  float beat_freqs[2] = { f-g, f+g };
 
90
}
 
91
 
 
92
12. Arithmetic on void- and Function-Pointers
 
93
In GNU C, addition and subtraction operations are supported on pointers to void and on 
 
94
pointers to functions. This is done by treating the size of a void or of a function as 1.
 
95
A consequence of this is that sizeof is also allowed on void and on function types, and 
 
96
returns 1. 
 
97
 
 
98
13. Non-Lvalue Arrays May Have Subscripts
 
99
struct foo {int a[4];};
 
100
struct foo f();
 
101
bar (int index){
 
102
 return f().a[index];
 
103
}
 
104
 
 
105
14. Slightly Looser Rules for Escaped Newlines
 
106
Recently, the preprocessor has relaxed its treatment of escaped newlines. Previously, 
 
107
the newline had to immediately follow a backslash. The current implementation allows 
 
108
whitespace in the form of spaces, horizontal and vertical tabs, and form feeds between 
 
109
the backslash and the subsequent newline.
 
110
 
 
111
15. Arrays of Variable Length, or Zero, in C/C++
 
112
 
 
113
16. Complex Numbers
 
114
 
 
115
17. Conditionals with Omitted Operands
 
116
x ? : y
 
117
 
 
118
18. Referring to a Type with typeof
 
119
 
 
120
19. Constructing Function Calls (done)
 
121
void * __builtin_apply_args ()
 
122
void * __builtin_apply (void (*function)(), void *arguments, size_t size)
 
123
void __builtin_return (void *result)
 
124
 
 
125
20. Nested Functions
 
126
foo (double a, double b) {
 
127
  double square (double z) { return z * z; }
 
128
  return square (a) + square (b);
 
129
}
 
130
 
 
131
21. Labels as Values
 
132
void *ptr;
 
133
ptr = &&foo;
 
134
goto *ptr;
 
135
 
 
136
22. C: Statements and Declarations in Expressions
 
137
({ int y = foo (); int z;
 
138
   if (y > 0) z = y;
 
139
   else z = - y;
 
140
   z; })
 
141
 
 
142
23. Locally Declared Labels
 
143
__label__ label;
 
144
__label__ label1, label2, /* ... */;