diff options
author | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2006-01-19 08:27:53 +0000 |
---|---|---|
committer | Gabriel Dos Reis <gdr@integrable-solutions.net> | 2006-01-19 08:27:53 +0000 |
commit | cda3ccbceda9da8345473fa9455d43305e60b22f (patch) | |
tree | 8db652e3a8256182c1388b8964837e3657381e9a | |
parent | c5db5a49c7161930eb78912a3d72bbb7b8f70e66 (diff) |
fix doc thinkocxx-reflection-branch
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/cxx-reflection-branch@109949 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/doc/extend.texi | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi index 03ba2d540c6..d277a52d251 100644 --- a/gcc/doc/extend.texi +++ b/gcc/doc/extend.texi @@ -9631,6 +9631,34 @@ ELF Handling For Thread-Local Storage} for a detailed explanation of the four thread-local storage addressing models, and how the run-time is expected to function. +@node Reflection +@section List of Enumerators +@cindex enumerator list + +In GNU C++, the list of enumerators appearing in an enumeration +definition can be obtained with the @code{__constants__} operator. + +@smallexample +enum Day @{ + Monday, Tuesday, Wednesday, Thursday, Firday, Saturday, Sunday +@}; + +const Day week[] = __constants__ (Day); +@end smallexample + +The expression acts ``as if'' written in the form of a brace-enclosed +initializer-list: + +@smallexample +const Day week[] = @{ + Monday, Tuesday, Wednesday, Thursday, Firday, Saturday, Sunday +@}; +@end smallexample + +The enumerators appear in the same order as in the definition of +their enumeration. In particular, if there is no enumerator then the +brace-enclosed initializer is an empty list. + @menu * C99 Thread-Local Edits:: * C++98 Thread-Local Edits:: @@ -9855,34 +9883,6 @@ test specifically for GNU C++ (@pxref{Common Predefined Macros,, Predefined Macros,cpp,The GNU C Preprocessor}). -@node Reflection -@section List of Enumerators -@cindex enumerator list - -In GNU C++, the list of enumerators appearing in an enumeration -definition can be obtained with the @code{__constants__} operator. - -@smallexample -enum Day { - Monday, Tuesday, Wednesday, Thursday, Firday, Saturday, Sunday -}; - -const Day week[] = __constants__ (Day); -@end smallexample - -The expression acts ``as if'' written in the form of a brace-enclosed -initializer-list: - -@smallexample -const Day week[] = { - Monday, Tuesday, Wednesday, Thursday, Firday, Saturday, Sunday -}; -@end smallexample - -The enumerators appear in the same order as in the definition of -their enumeration. In particular, if there is no enumerator then the -brace-enclosed initializer is an empty list. - @menu * Volatiles:: What constitutes an access to a volatile object. |