public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/16275] New: error in C string catenation
@ 2004-06-29 15:45 planta at planta dot de
2004-06-29 15:45 ` [Bug c/16275] " planta at planta dot de
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: planta at planta dot de @ 2004-06-29 15:45 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]
Seems like GCC 3.3.3 has problems with catenating strings by defining C macros
in this way. Worked at least with GCC 2.9.5.
#define PP_CAT(s1,s2) s1 ## s2
char *templ = PP_CAT(DBUTILNAME, "XXXXXX");
GCC ends up in:
pdbutil.c:699:50: pasting "DBUTILNAME" and ""XXXXXX"" does not give a valid
preprocessing token
GCC output:
Reading specs from /opt/sfw/gcc-3/lib/gcc-lib/sparc-sun-solaris2.9/3.3/specs
Konfiguriert mit: ../gcc-3.3/configure --prefix=/opt/sfw/gcc-3 --with-
ld=/usr/ccs/bin/ld --with-as=/usr/ccs/bin/as --without-gnu-ld --without-gn
u-as --enable-shared
Thread model: posix
gcc-Version 3.3
/opt/sfw/gcc-3/lib/gcc-lib/sparc-sun-solaris2.9/3.3/cc1 -E -quiet -v -
I../libclnt -I../libgen -I../libutil -I../libphelp -D__GNUC__=3 -D__GNUC_
MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -Dsparc -D__sparc__ -D__sparc -
D__GCC_NEW_VARARGS__ -Acpu=sparc -Amachine=sparc -DUNIX -DSUNOS -DDYNAMIC_DBDO
-DPDB_SINGLE_ATTACH -D_GNU_SOURCE -DHAVE_PREADWRITE -
DDEBUG ../libutil/pdbutil.c -m32 -Wall pdbutil.i
nicht vorhandenes Verzeichnis »/usr/local/include« wird ignoriert
nicht vorhandenes Verzeichnis »/opt/sfw/gcc-3/sparc-sun-solaris2.9/include«
wird ignoriert
#include "..." search starts here:
#include <...> search starts here:
../libclnt
../libgen
../libutil
../libphelp
/opt/sfw/gcc-3/include
/opt/sfw/gcc-3/lib/gcc-lib/sparc-sun-solaris2.9/3.3/include
/usr/include
End of search list.
../libutil/pdbutil.c:699:50: pasting "DBUTILNAME" and ""XXXXXX"" does not give
a valid preprocessing token
--
Summary: error in C string catenation
Product: gcc
Version: 3.3.3
Status: UNCONFIRMED
Severity: normal
Priority: P1
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: planta at planta dot de
CC: gcc-bugs at gcc dot gnu dot org
GCC host triplet: solaris59
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/16275] error in C string catenation
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
@ 2004-06-29 15:45 ` planta at planta dot de
2004-06-29 15:47 ` planta at planta dot de
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: planta at planta dot de @ 2004-06-29 15:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From planta at planta dot de 2004-06-29 15:45 -------
Created an attachment (id=6651)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6651&action=view)
preprocessed source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/16275] error in C string catenation
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
2004-06-29 15:45 ` [Bug c/16275] " planta at planta dot de
@ 2004-06-29 15:47 ` planta at planta dot de
2004-06-29 16:06 ` pinskia at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: planta at planta dot de @ 2004-06-29 15:47 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From planta at planta dot de 2004-06-29 15:45 -------
Created an attachment (id=6652)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6652&action=view)
source file
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/16275] error in C string catenation
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
2004-06-29 15:45 ` [Bug c/16275] " planta at planta dot de
2004-06-29 15:47 ` planta at planta dot de
@ 2004-06-29 16:06 ` pinskia at gcc dot gnu dot org
2004-09-02 20:34 ` pinskia at gcc dot gnu dot org
2004-09-02 20:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-06-29 16:06 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-06-29 16:04 -------
Not a bug, you cannot use ## to concat strings, remove ## and it will work; it is only for tokens.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/16275] error in C string catenation
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
` (2 preceding siblings ...)
2004-06-29 16:06 ` pinskia at gcc dot gnu dot org
@ 2004-09-02 20:34 ` pinskia at gcc dot gnu dot org
2004-09-02 20:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-02 20:34 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-02 20:34 -------
Reopening to mark as a dup of ...
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |UNCONFIRMED
Resolution|INVALID |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c/16275] error in C string catenation
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
` (3 preceding siblings ...)
2004-09-02 20:34 ` pinskia at gcc dot gnu dot org
@ 2004-09-02 20:35 ` pinskia at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-02 20:35 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-02 20:34 -------
bug 7976.
*** This bug has been marked as a duplicate of 7976 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16275
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2004-09-02 20:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-29 15:45 [Bug c/16275] New: error in C string catenation planta at planta dot de
2004-06-29 15:45 ` [Bug c/16275] " planta at planta dot de
2004-06-29 15:47 ` planta at planta dot de
2004-06-29 16:06 ` pinskia at gcc dot gnu dot org
2004-09-02 20:34 ` pinskia at gcc dot gnu dot org
2004-09-02 20:35 ` pinskia at gcc dot gnu dot org
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).