aboutsummaryrefslogtreecommitdiff
path: root/gcc/objc
diff options
context:
space:
mode:
authorStan Shebs <shebs@apple.com>2001-03-20 22:01:49 +0000
committerStan Shebs <shebs@gcc.gnu.org>2001-03-20 22:01:49 +0000
commite44949e91cd6bb3d528dd0ca105d49894a13e6c2 (patch)
treeb72697f64c821affd43732502542efe5ac4b3c3c /gcc/objc
parent2ba5f9b1345c6552b5b56f5ac2983f5459cbe7d2 (diff)
downloadgcc-e44949e91cd6bb3d528dd0ca105d49894a13e6c2.zip
gcc-e44949e91cd6bb3d528dd0ca105d49894a13e6c2.tar.gz
gcc-e44949e91cd6bb3d528dd0ca105d49894a13e6c2.tar.bz2
objc-act.c (get_static_reference): Use NULL_TREE.
* objc/objc-act.c (get_static_reference): Use NULL_TREE. (get_object_reference): Ditto. (error_with_ivar): Use error_with_file_and_line. (warn_with_method): Use warning_with_file_and_line. From-SVN: r40672
Diffstat (limited to 'gcc/objc')
-rw-r--r--gcc/objc/objc-act.c28
1 files changed, 17 insertions, 11 deletions
diff --git a/gcc/objc/objc-act.c b/gcc/objc/objc-act.c
index c5db445..c4d03dc 100644
--- a/gcc/objc/objc-act.c
+++ b/gcc/objc/objc-act.c
@@ -1126,7 +1126,7 @@ get_static_reference (interface, protocols)
(in build_pointer_type)...so that the new template
we just created will actually be used...what a hack! */
if (TYPE_POINTER_TO (t))
- TYPE_POINTER_TO (t) = 0;
+ TYPE_POINTER_TO (t) = NULL_TREE;
type = t;
}
@@ -1176,7 +1176,7 @@ get_object_reference (protocols)
(in build_pointer_type)...so that the new template
we just created will actually be used...what a hack! */
if (TYPE_POINTER_TO (t))
- TYPE_POINTER_TO (t) = NULL;
+ TYPE_POINTER_TO (t) = NULL_TREE;
type = t;
}
@@ -3616,10 +3616,13 @@ error_with_ivar (message, decl, rawdecl)
report_error_function (DECL_SOURCE_FILE (decl));
- fprintf (stderr, "%s:%d: ",
- DECL_SOURCE_FILE (decl), DECL_SOURCE_LINE (decl));
- memset (errbuf, 0, BUFSIZE);
- fprintf (stderr, "%s `%s'\n", message, gen_declaration (rawdecl, errbuf));
+ strcpy (errbuf, message);
+ strcat (errbuf, " `");
+ gen_declaration (rawdecl, errbuf + strlen (errbuf));
+ strcat (errbuf, "'");
+ error_with_file_and_line (DECL_SOURCE_FILE (decl),
+ DECL_SOURCE_LINE (decl),
+ errbuf);
}
#define USERTYPE(t) \
@@ -7043,11 +7046,14 @@ warn_with_method (message, mtype, method)
report_error_function (DECL_SOURCE_FILE (method));
- fprintf (stderr, "%s:%d: warning: ",
- DECL_SOURCE_FILE (method), DECL_SOURCE_LINE (method));
- memset (errbuf, 0, BUFSIZE);
- fprintf (stderr, "%s `%c%s'\n",
- message, mtype, gen_method_decl (method, errbuf));
+ /* Add a readable method name to the warning. */
+ sprintf (errbuf, "%s `%c", message, mtype);
+ gen_method_decl (method, errbuf + strlen (errbuf));
+ strcat (errbuf, "'");
+
+ warning_with_file_and_line (DECL_SOURCE_FILE (method),
+ DECL_SOURCE_LINE (method),
+ errbuf);
}
/* Return 1 if METHOD is consistent with PROTO. */