dean@ndmath.UUCP (09/01/87)
i'll try repeating this question, as my earlier posting drew no response. i'm hoping someone with access to a copy of the draft proposal can answer this. the new syntax for pointer declarators allows declarators of the form '*' type_specifier_list declarator. are there any restrictions placed on the type_specifier_list? specifically, can it be something other than a combination of "const" and "volatile"? in particular, would the declaration extern * int ptr_to_int; be legal under dpANSI-C? my own opinion is that this would be illegal, since the declaration specifier "extern" would default to "extern int", leading to two actual types in the declaration. would it make any sense to change "const" and "volatile" from type_specifiers, which they don't really seem to be, to something like type_modifiers? the type_specifier_list in pointer declarators could then be changed to type_modifier_list. dean
gwyn@brl-smoke.UUCP (09/02/87)
In article <276@ndmath.UUCP> dean@ndmath.UUCP (Dean Alvis) writes: >would it make any sense to change "const" and "volatile" from >type_specifiers, which they don't really seem to be, to something >like type_modifiers? Dave Prosser has a proposal for this that will undoubtedly be discussed at the X3J11 meeting in a couple of weeks.
mouse@mcgill-vision.UUCP (09/22/87)
In article <276@ndmath.UUCP>, dean@ndmath.UUCP (Dean Alvis) writes: > the new [ie, ANSI draft standard] syntax for pointer declarators > allows declarators of the form > '*' type_specifier_list declarator. > [is type_specifier_list restricted?] in particular, would the > declaration > extern * int ptr_to_int; > be legal under dpANSI-C? my own opinion is that this would be > illegal, since the declaration specifier "extern" would default to > "extern int", leading to two actual types in the declaration. By that logic, extern int *foo; is illegal because the leading extern defaults to extern int, resulting in two actual types again. der Mouse (mouse@mcgill-vision.uucp)