From: Mathieu Desnoyers Date: Fri, 14 Jan 2011 00:40:08 +0000 (-0500) Subject: update to enum X-Git-Tag: v1.8~91 X-Git-Url: http://git.efficios.com/?p=ctf.git;a=commitdiff_plain;h=4767a9e7be90124811752afece83d68917d7014c;ds=sidebyside update to enum Ensure we don't leave enum size runtime-defined without extracting any information. Signed-off-by: Mathieu Desnoyers --- diff --git a/common-trace-format-proposal.txt b/common-trace-format-proposal.txt index fcc3432..6460b06 100644 --- a/common-trace-format-proposal.txt +++ b/common-trace-format-proposal.txt @@ -1,5 +1,5 @@ -RFC: Common Trace Format (CTF) Proposal (v1.6) +RFC: Common Trace Format (CTF) Proposal (pre-v1.7) Mathieu Desnoyers, EfficiOS Inc. @@ -268,13 +268,12 @@ description within the metadata. The mapping table maps inclusive value ranges values to strings. An enumeration from the C language can be represented in this format by having the same start_value and end_value for each element, which is in fact a range of size 1. This single-value range is supported without -repeating the start and end values with the value = string declaration. If the - is omitted, the type chosen by the C compiler to hold the -enumeration is used. The specifier can only be omitted for -enumerations containing only simple "value -> string" mappings (compatible with -C). +repeating the start and end values with the value = string declaration. -enum name { +If a numeric value is encountered between < >, it represents the integer type +size used to hold the enumeration, in bits. + +enum name { string = start_value1 ... end_value1, "other string" = start_value2 ... end_value2, yet_another_string, /* will be assigned to end_value2 + 1 */ @@ -285,7 +284,7 @@ enum name { If the values are omitted, the enumeration starts at 0 and increment of 1 for each entry: -enum name { +enum <32> name { ZERO, ONE, TWO, @@ -705,7 +704,7 @@ struct name { ... }; -enum name { +enum name { ... }; @@ -716,7 +715,7 @@ struct { ... } -enum { +enum { ... }