Changeset 1391 for branches/GNU/src/gcc/libiberty/cp-demangle.c
- Timestamp:
- Apr 27, 2004, 8:39:34 PM (21 years ago)
- Location:
- branches/GNU/src/gcc
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GNU/src/gcc
- Property svn:ignore
-
old new 26 26 configure.vr 27 27 configure.vrs 28 dir.info 28 29 Makefile 29 dir.info30 30 lost+found 31 31 update.out
-
- Property svn:ignore
-
branches/GNU/src/gcc/libiberty/cp-demangle.c
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.1.1.2
r1390 r1391 51 51 #include <string.h> 52 52 #endif 53 54 #include <ctype.h> 53 55 54 56 #include "ansidecl.h" … … 834 836 } 835 837 dm->style = style; 836 dm->is_constructor = 0;837 dm->is_destructor = 0;838 dm->is_constructor = (enum gnu_v3_ctor_kinds) 0; 839 dm->is_destructor = (enum gnu_v3_dtor_kinds) 0; 838 840 839 841 return dm; … … 973 975 { 974 976 if (error_message == NULL) 975 error_message = strdup ("Expected ?");977 error_message = (char *) strdup ("Expected ?"); 976 978 error_message[9] = c; 977 979 return error_message; … … 1467 1469 while (length-- > 0) 1468 1470 { 1471 int ch; 1469 1472 if (end_of_name_p (dm)) 1470 1473 return "Unexpected end of name in <identifier>."; 1471 if (!dyn_string_append_char (identifier, next_char (dm))) 1474 ch = next_char (dm); 1475 1476 /* Handle extended Unicode characters. We encode them as __U{hex}_, 1477 where {hex} omits leading 0's. For instance, '$' is encoded as 1478 "__U24_". */ 1479 if (ch == '_' 1480 && peek_char (dm) == '_' 1481 && peek_char_next (dm) == 'U') 1482 { 1483 char buf[10]; 1484 int pos = 0; 1485 advance_char (dm); advance_char (dm); length -= 2; 1486 while (length-- > 0) 1487 { 1488 ch = next_char (dm); 1489 if (!isxdigit (ch)) 1490 break; 1491 buf[pos++] = ch; 1492 } 1493 if (ch != '_' || length < 0) 1494 return STATUS_ERROR; 1495 if (pos == 0) 1496 { 1497 /* __U_ just means __U. */ 1498 if (!dyn_string_append_cstr (identifier, "__U")) 1499 return STATUS_ALLOCATION_FAILED; 1500 continue; 1501 } 1502 else 1503 { 1504 buf[pos] = '\0'; 1505 ch = strtol (buf, 0, 16); 1506 } 1507 } 1508 1509 if (!dyn_string_append_char (identifier, ch)) 1472 1510 return STATUS_ALLOCATION_FAILED; 1473 1511 } … … 3361 3399 else 3362 3400 { 3363 RETURN_IF_ERROR (result_add (dm, "std::basic_istream<char, std::char_trai nts<char> >"));3401 RETURN_IF_ERROR (result_add (dm, "std::basic_istream<char, std::char_traits<char> >")); 3364 3402 new_last_source_name = "basic_istream"; 3365 3403 } … … 3881 3919 3882 3920 3921 #ifndef IN_GLIBCPP_V3 3883 3922 /* Demangle NAME in the G++ V3 ABI demangling style, and return either 3884 3923 zero, indicating that some error occurred, or a demangling_t … … 3918 3957 3919 3958 3920 #ifndef IN_GLIBCPP_V33921 3959 /* Return non-zero iff NAME is the mangled form of a constructor name 3922 3960 in the G++ V3 ABI demangling style. Specifically, return: … … 3937 3975 } 3938 3976 else 3939 return 0;3977 return (enum gnu_v3_ctor_kinds) 0; 3940 3978 } 3941 3979 … … 3959 3997 } 3960 3998 else 3961 return 0;3999 return (enum gnu_v3_dtor_kinds) 0; 3962 4000 } 3963 4001 #endif /* IN_GLIBCPP_V3 */ -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.