This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

preprocessor/6143: apostrophe (single-quote) in #error directive text causes error



>Number:         6143
>Category:       preprocessor
>Synopsis:       apostrophe (single-quote) in #error directive text causes error
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          rejects-legal
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 02 17:36:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     James D. Howard @ Intel Corporation
>Release:        unknown-1.0
>Organization:
>Environment:
RedHat release 7.2 for x86, packaged gcc, gcc3 as:
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --disable-checking --host=i386-redhat-linux
Thread model: posix
gcc version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3)
 /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/cpp0 -lang-c -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=2 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i386__ error-directive.c error-directive.i
GNU CPP version 3.0.2 20010905 (Red Hat Linux 7.1 3.0.1-3) (cpplib) (i386 Linux/ELF)
ignoring nonexistent directory "/usr/i386-redhat-linux/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i386-redhat-linux/3.0.2/include
 /usr/include
End of search list.
>Description:
The text message after the #error and/or #warning pre-processor directives should just print out the literal text.  gcc 2.* and gcc 3.* generate a pre-processing-time error if the text contains an English contraction like "can't" or "shouldn't" - which (conceptually) has mis-matched single-quotes

Attachment is .c file with NO #includes referenced; it is free-standaing as it is.

Such source is accepted as legal (i.e. swallowed without complaint) with other compilers I've tried.
>How-To-Repeat:
gcc3 -c error-directive.c
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: application/octet-stream; name="error-directive.c"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="error-directive.c"

LyogZXJyb3ItZGlyZWN0aXZlLmMgLSBkZW1vbnN0cmF0ZSBjb21wbGFpbnQgYWJvdXQgbGl0ZXJh
bCB0ZXh0IGluICNlcnJvciB3aXRoIHNpbmdsZSBxdW90ZQogKi8KCiNlcnJvciBIZXJlIGlzIGEg
ZGlyZWN0aXZlLXRyaWdnZXJlZCBlcnJvciBtZXNzYWdlLCBvZnRlbiB1c2VkIGluIGlmLWRlZnMK
I2Vycm9yIFRoaXMgbWVzc2FnZSB0ZXh0IHNob3VsZG4ndCBiZSBjb21wbGFpbmVkIGFib3V0IC0g
anVzdCBwcmludGVkIG91dCBhcyBhbiBlcnJvcgoKI3dhcm5pbmcgSGVyZSBpcyBhIGRpcmVjdGl2
ZS10cmlnZ2VyZWQgd2FybmluZyBtZXNzYWdlCiN3YXJuaW5nIFRoaXMgd2FybmluZyB0ZXh0IG1l
c3NhZ2Ugc2hvdWxkbid0IGJlIGNvbXBsYWluZWQgYWJvdXQK


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]