+2000-03-06 Jason Merrill <jason@casey.cygnus.com>
+
+ * cpphash.c (collect_expansion): Also catch ## at start of macro.
+
+ * varasm.c (make_decl_rtl): Don't add a number to members of
+ local classes.
+ (make_function_rtl): Likewise.
+
2000-03-06 Alexandre Oliva <oliva@lsd.ic.unicamp.br>
* gcse.c (compute_can_copy): Adjust if/else blocks from rth's
else if (last_token == PASTE)
/* ## ## - the second ## is ordinary. */
goto norm;
+ else if (last_token == START)
+ cpp_error (pfile, "`##' at start of macro definition");
/* Discard the token and any hspace before it. */
while (is_hspace (pfile->token_buffer[here-1]))
char *name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
char *new_name = name;
- /* Rename a nested function to avoid conflicts. */
+ /* Rename a nested function to avoid conflicts, unless it's a member of
+ a local class, in which case the class name is already unique. */
if (decl_function_context (decl) != 0
+ && ! TYPE_P (DECL_CONTEXT (decl))
&& DECL_INITIAL (decl) != 0
&& DECL_RTL (decl) == 0)
{
if (DECL_RTL (decl) == 0)
{
/* Can't use just the variable's own name for a variable
- whose scope is less than the whole file.
+ whose scope is less than the whole file, unless it's a member
+ of a local class (which will already be unambiguous).
Concatenate a distinguishing number. */
- if (!top_level && !TREE_PUBLIC (decl) && asmspec == 0)
+ if (!top_level && !TREE_PUBLIC (decl)
+ && ! TYPE_P (DECL_CONTEXT (decl))
+ && asmspec == 0)
{
char *label;