This is the mail archive of the gcc@gcc.gnu.org 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]

confused by code in C++ parser


This is (a slightly edited form of) the primary: string-constant rule
in the C++ parser.

	| STRING
		{
		  /* c_build_string doesn't set up TYPE_MAIN_VARIANT of
		     a const array the way we want, so fix it.  */
		  if (flag_const_strings)
		    TREE_TYPE ($$) = build_cplus_array_type
		      (TREE_TYPE (TREE_TYPE ($$)),
		       TYPE_DOMAIN (TREE_TYPE ($$)));
		}

Can someone please explain to me what c_build_string (formerly
combine_strings) gets wrong about the type of a string constant for
C++, and what the correct type is?  Thanks.

-- 
zw    They are calling true what their heart desires; what they would have
      be true, and if the iron bones of the earth or the light in the width
      of the sky say different, they will not permit these things to be
      knowledge within them, nor grant regard to any who do.
      	-- Graydon Saunders


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