aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorTheodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>1999-02-02 22:47:20 +0100
committerJeff Law <law@gcc.gnu.org>1999-02-02 14:47:20 -0700
commit0daa67d1d652bafcfb4130b9b8ad4471bd89405d (patch)
tree5a900ffee23580856975d070e1adb1b3b51604db /gcc
parent132e01b1e6a6e4829e3d1657fa2479c187325d45 (diff)
downloadgcc-0daa67d1d652bafcfb4130b9b8ad4471bd89405d.zip
gcc-0daa67d1d652bafcfb4130b9b8ad4471bd89405d.tar.gz
gcc-0daa67d1d652bafcfb4130b9b8ad4471bd89405d.tar.bz2
* decl2.c (lang_decode_option): Use read_integral_parameter.
From-SVN: r24986
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/decl2.c30
2 files changed, 8 insertions, 26 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index d74c484..3b84555 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,7 @@
+Tue Feb 2 22:38:48 1999 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
+
+ * decl2.c (lang_decode_option): Use read_integral_parameter.
+
1999-02-01 Mark Mitchell <mark@markmitchell.com>
* pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 7b3d52f..964e35f 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -601,35 +601,13 @@ lang_decode_option (argc, argv)
}
else if (!strncmp (p, "template-depth-", 15))
{
- char *endp = p + 15;
- while (*endp)
- {
- if (*endp >= '0' && *endp <= '9')
- endp++;
- else
- {
- error ("Invalid option `%s'", p - 2);
- goto template_depth_lose;
- }
- }
- max_tinst_depth = atoi (p + 15);
- template_depth_lose: ;
+ max_tinst_depth =
+ read_integral_parameter (p + 15, p - 2, max_tinst_depth);
}
else if (!strncmp (p, "name-mangling-version-", 22))
{
- char *endp = p + 22;
- while (*endp)
- {
- if (*endp >= '0' && *endp <= '9')
- endp++;
- else
- {
- error ("Invalid option `%s'", p - 2);
- goto mangling_version_lose;
- }
- }
- name_mangling_version = atoi (p + 22);
- mangling_version_lose: ;
+ name_mangling_version =
+ read_integral_parameter (p + 22, p - 2, name_mangling_version);
}
else for (j = 0;
!found && j < sizeof (lang_f_options) / sizeof (lang_f_options[0]);