This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Updated: [Patch, c* ,ObjC*] handle string objects in format checking.

On Thu, 28 Oct 2010, IainS wrote:

> +@node Darwin Format Checks
> +@subsection Darwin Format Checks
> +
> +Darwin targets support the @code{CFString} (or @code{__CFString__}) in the format 
> +attribute context.  Declarations made with such attribution will be parsed for correct syntax
> +and format argument types.  However, parsing of the format string itself is currently undefined
> +and will not be carried out by this version of the compiler.  
> +
> +Additionally, @code{CFStringRefs} (defined by the @code{CoreFoundation} headers) may
> +also be used as format arguments.  Note that the relevant headers are only likely to be
> +available on Darwin (OSX) installations.   On such installations, the  XCode and system

Three spaces after ".", should be two; two before "XCode", should be one.

> +static int first_target_format_type;
> +static const char * format_name (int format_num);

No space after "*".

> +  if (format_types[info->format_type].flags 

Bad indentation of the "&", should be in the column immediately after the 
"(" on the line above.

> +(objc_construct_string_object,
> + "Targets may provide a string object type that can be used within\
> + and between c, c++ and their respective objective-c dialects.\

C, C++, Objective-C.

> + A string object might, for example, embed encoding and length information.\
> + These objects are considered opaque to the compiler and handled as references.\
> + An ideal implementation makes the composition of the string object\
> + match that of the objective-c @code{NSString} (@code{NXString} for GNUStep),\


> + allowing efficient interworking between c-only and objective-c code.\

C-only, Objective-C.

> + If a target implements string objects then this hook should return a\
> + reference to such an object constructed from the normal 'c' string\

`C' (in TeXinfo, ` is an opening quote and ' a closing one).

> + representation provided in @var{string}.\
> + At present, the hook is used by objective-c only, to obtain a\


> +(string_object_ref_type_p,
> + "If a target implements string objects then this hook should return\
> + 'true' if @var{stringref} is a valid reference to such an object.",


The C and documentation changes are OK with those fixes (and of course 
tm.texi regenerated).

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]