+2006-12-07 Borut Razem <borut.razem AT siol.net>
+
+ * support/cpp2/cpplib.c: reverted sdcpp special handling of _Pragma()
+ directive
+
2006-12-06 Maarten Brock <sourceforge.brock AT dse.nl>
* src/SDCCsymt.c (addDecl): fixed bug 1609244
2006-11-27 Borut Razem <borut.razem AT siol.net>
- * support\cpp2\cppexp.c, support\cpp2\hashtable.h,
- support\cpp2\Makefile.in, support\cpp2\cppfiles.c,
- support\cpp2\output.h, support\cpp2\cppinit.c,
- support\cpp2\cpplib.c, support\cpp2\cpplib.h,
- support\cpp2\Makefile.bcc, support\cpp2\cpphash.c,
- support\cpp2\cppdefault.c, support\cpp2\system.h,
- support\cpp2\cpphash.h, support\cpp2\cpplex.c,
- support\cpp2\cppdefault.h, support\cpp2\mbchar.c,
- support\cpp2\prefix.c, support\cpp2\except.h,
- support\cpp2\hwint.h, support\cpp2\cppmacro.c,
- support\cpp2\line-map.h, support\cpp2\sdcpp.dsp,
- support\cpp2\sdcc.h, support\cpp2\mkdeps.c,
- support\cpp2\version.c, support\cpp2\cppmain.c,
- support\cpp2\version.h, support\cpp2\hashtable.c,
- support\cpp2\cpperror.c:
+ * support/cpp2/cppexp.c, support/cpp2/hashtable.h,
+ support/cpp2/Makefile.in, support/cpp2/cppfiles.c,
+ support/cpp2/output.h, support/cpp2/cppinit.c,
+ support/cpp2/cpplib.c, support/cpp2/cpplib.h,
+ support/cpp2/Makefile.bcc, support/cpp2/cpphash.c,
+ support/cpp2/cppdefault.c, support/cpp2/system.h,
+ support/cpp2/cpphash.h, support/cpp2/cpplex.c,
+ support/cpp2/cppdefault.h, support/cpp2/mbchar.c,
+ support/cpp2/prefix.c, support/cpp2/except.h,
+ support/cpp2/hwint.h, support/cpp2/cppmacro.c,
+ support/cpp2/line-map.h, support/cpp2/sdcpp.dsp,
+ support/cpp2/sdcc.h, support/cpp2/mkdeps.c,
+ support/cpp2/version.c, support/cpp2/cppmain.c,
+ support/cpp2/version.h, support/cpp2/hashtable.c,
+ support/cpp2/cpperror.c:
synchronized with GCC CPP release version 3.3.6,
the latest where cppmain.c still exists.
- * support\cpp2\cpptrad.c, support\cpp2\sdcppmain.c,
- support\cpp2\sdcppinit.c: added
+ * support/cpp2/cpptrad.c, support/cpp2/sdcppmain.c,
+ support/cpp2/sdcppinit.c: added
2006-11-27 Borut Razem <borut.razem AT siol.net>
static void do_linemarker PARAMS ((cpp_reader *));
static const cpp_token *get_token_no_padding PARAMS ((cpp_reader *));
static const cpp_token *get__Pragma_string PARAMS ((cpp_reader *));
-static unsigned char *destringize PARAMS ((const cpp_string *, unsigned int *));
static void destringize_and_run PARAMS ((cpp_reader *, const cpp_string *));
static int parse_answer PARAMS ((cpp_reader *, struct answer **, int));
static cpp_hashnode *parse_assertion PARAMS ((cpp_reader *, struct answer **,
pfile->state.poisoned_ok = 0;
}
+/* SDCC specific
+ sdcc_hash pragma */
static void
do_pragma_sdcc_hash (pfile)
cpp_reader *pfile;
return string;
}
-/* Returns a malloced buffer containing a destringized cpp_string by
- removing the first \ of \" and \\ sequences. */
-static unsigned char *
-destringize (in, len)
- const cpp_string *in;
- unsigned int *len;
-{
- const unsigned char *src, *limit;
- unsigned char *dest, *result;
-
- dest = result = (unsigned char *) xmalloc (in->len);
- for (src = in->text, limit = src + in->len; src < limit;)
- {
- /* We know there is a character following the backslash. */
- if (*src == '\\' && (src[1] == '\\' || src[1] == '"'))
- src++;
- *dest++ = *src++;
- }
-
- *len = dest - result;
- return result;
-}
-
/* Destringize IN into a temporary buffer, by removing the first \ of
\" and \\ sequences, and process the result as a #pragma directive. */
static void
const cpp_token *string = get__Pragma_string (pfile);
if (string)
- {
- unsigned int len;
-
- unsigned char *buffer = destringize (&string->val.str, &len);
- buffer[len] = 0;
- fputs ("\n#pragma ", pfile->print.outf);
- fputs (buffer, pfile->print.outf);
- putc ('\n', pfile->print.outf);
- free ((PTR) buffer);
- }
+ destringize_and_run (pfile, &string->val.str);
else
cpp_error (pfile, DL_ERROR,
"_Pragma takes a parenthesized string literal");