* combine_strings doesn't work for OBJC_STRING_CST
@ 2000-07-29 22:48 Ovidiu Predescu
0 siblings, 0 replies; only message in thread
From: Ovidiu Predescu @ 2000-07-29 22:48 UTC (permalink / raw)
To: gcc, gcc-bugs
[-- Attachment #1: Type: text/plain, Size: 1163 bytes --]
Hi,
I just noticed that combine_strings() no longer works for OBJC_STRING_CST tree
nodes. The problem seems to be caused by a check for the node type in the
TREE_STRING_LENGTH and TREE_STRING_POINTER macros, which expect to have as
argument a STRING_CST node.
The problem can be observed by compiling a very simple Objective-C program:
-- file test.m --
#include <stdio.h>
#include <objc/NXConstStr.h>
int main(int argc, void **args)
{
printf ([@"this is a string\n" cString]);
return 0;
}
-- end of test.m --
Compile it with gcc -o test test.m -lobjc.
I've added this test program and another one as gcc/testsuite/objc/execute/{str
ing1.m,string2.m}. They both check for the correct behavior of combine_strings.
Rewriting the TREE_STRING_LENGTH and TREE_STRING_POINTER to work with both
STRING_CST and OBJC_STRING_CST could solve the problem. However these macros
are implemented in terms of TREE_CHECK which doesn't allow alternative node
types.
Any idea how to solve the problem?
Thanks,
Ovidiu
--
Ovidiu Predescu <ovidiu@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://www.geocities.com/SiliconValley/Monitor/7464/
[-- Attachment #2: pgp00000.pgp --]
[-- Type: text/x-c, Size: 1486 bytes --]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Content-Type: text/plain; charset=us-ascii
Hi,
I just noticed that combine_strings() no longer works for OBJC_STRING_CST tree
nodes. The problem seems to be caused by a check for the node type in the
TREE_STRING_LENGTH and TREE_STRING_POINTER macros, which expect to have as
argument a STRING_CST node.
The problem can be observed by compiling a very simple Objective-C program:
- -- file test.m --
#include <stdio.h>
#include <objc/NXConstStr.h>
int main(int argc, void **args)
{
printf ([@"this is a string\n" cString]);
return 0;
}
- -- end of test.m --
Compile it with gcc -o test test.m -lobjc.
I've added this test program and another one as gcc/testsuite/objc/execute/{str
ing1.m,string2.m}. They both check for the correct behavior of combine_strings.
Rewriting the TREE_STRING_LENGTH and TREE_STRING_POINTER to work with both
STRING_CST and OBJC_STRING_CST could solve the problem. However these macros
are implemented in terms of TREE_CHECK which doesn't allow alternative node
types.
Any idea how to solve the problem?
Thanks,
Ovidiu
- --
Ovidiu Predescu <ovidiu@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://www.geocities.com/SiliconValley/Monitor/7464/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.2 (GNU/Linux)
Comment: Exmh version 2.2 06/23/2000
iD8DBQE5g8GX1cM8Hy0YC5kRAidpAKChfRrHRGeeThrGI9ioPvcES6TsmgCfSGZY
UxDtfxV3lVJxqOno7sJ/tM4=
=E2yC
-----END PGP SIGNATURE-----
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-07-29 22:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-07-29 22:48 combine_strings doesn't work for OBJC_STRING_CST Ovidiu Predescu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).