summaryrefslogtreecommitdiff
path: root/support/cpp/gcc
diff options
context:
space:
mode:
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>2022-11-30 04:34:37 +0000
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>2022-11-30 04:34:37 +0000
commitc11cae897a8da8bcfb979e98bc3f39ffdcb3e742 (patch)
tree8daa51ae12436a2c2ba1c8a1e47a89146dd90c4d /support/cpp/gcc
parent415f7b9caa39f253795302e71bedca802e9f49cf (diff)
* support/cpp/gcc/gcc.cc,
support/cpp/gcc/opts.cc, support/cpp/gcc/opts-common.cc, support/cpp/gcc/opts-global.cc, support/cpp/gcc/prefix.cc, support/cpp/gcc/toplev.cc, support/cpp/libcpp/lex.cc, support/cpp/libcpp/mkdeps.cc, support/cpp/gcc/c-family/c-opts.cc, support/cpp/gcc/c-family/c-ppoutput.cc: Possible fix for bug #3524 git-svn-id: http://svn.code.sourceforge.net/p/sdcc/code/trunk/sdcc@13760 4a8a32a2-be11-0410-ad9d-d568d2c75423
Diffstat (limited to 'support/cpp/gcc')
-rw-r--r--support/cpp/gcc/c-family/c-opts.cc5
-rw-r--r--support/cpp/gcc/c-family/c-ppoutput.cc5
-rw-r--r--support/cpp/gcc/gcc.cc6
-rw-r--r--support/cpp/gcc/opts-common.cc3
-rw-r--r--support/cpp/gcc/opts-global.cc9
-rw-r--r--support/cpp/gcc/opts.cc3
-rw-r--r--support/cpp/gcc/prefix.cc4
-rw-r--r--support/cpp/gcc/toplev.cc14
8 files changed, 18 insertions, 31 deletions
diff --git a/support/cpp/gcc/c-family/c-opts.cc b/support/cpp/gcc/c-family/c-opts.cc
index 5277c0ee7..993fce449 100644
--- a/support/cpp/gcc/c-family/c-opts.cc
+++ b/support/cpp/gcc/c-family/c-opts.cc
@@ -44,10 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "file-prefix-map.h" /* add_*_prefix_map() */
// #include "../libcpp/internal.h" // BUG
-#include <map> // BUG?
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
#ifndef DOLLARS_IN_IDENTIFIERS
# define DOLLARS_IN_IDENTIFIERS true
diff --git a/support/cpp/gcc/c-family/c-ppoutput.cc b/support/cpp/gcc/c-family/c-ppoutput.cc
index ccf8b9e83..9e5d2cef6 100644
--- a/support/cpp/gcc/c-family/c-ppoutput.cc
+++ b/support/cpp/gcc/c-family/c-ppoutput.cc
@@ -25,9 +25,8 @@
#include "langhooks.h"
#include "c-pragma.h" /* For parse_in. */
#include "file-prefix-map.h" /* remap_macro_filename() */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
+
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
/* Encapsulates state used to convert a stream of tokens into a text
file. */
diff --git a/support/cpp/gcc/gcc.cc b/support/cpp/gcc/gcc.cc
index 4737a7935..7d5fc39a1 100644
--- a/support/cpp/gcc/gcc.cc
+++ b/support/cpp/gcc/gcc.cc
@@ -45,10 +45,8 @@ compilation is specified by a string called a "spec". */
#include "filenames.h"
#include "spellcheck.h"
-#include <cassert>
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
+
// sdcpp
extern bool flag_wpa;
diff --git a/support/cpp/gcc/opts-common.cc b/support/cpp/gcc/opts-common.cc
index 08ff64fed..3abaff3f8 100644
--- a/support/cpp/gcc/opts-common.cc
+++ b/support/cpp/gcc/opts-common.cc
@@ -26,8 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "spellcheck.h"
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ <<":" << __func__ << "\n" )
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
static void prune_options (struct cl_decoded_option **, unsigned int *);
diff --git a/support/cpp/gcc/opts-global.cc b/support/cpp/gcc/opts-global.cc
index 20fbfcf8e..1c1664099 100644
--- a/support/cpp/gcc/opts-global.cc
+++ b/support/cpp/gcc/opts-global.cc
@@ -18,9 +18,6 @@ You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ <<":" << __func__ << "\n" )
-#include <cassert>
#include "config.h"
#include "system.h"
@@ -44,6 +41,8 @@ along with GCC; see the file COPYING3. If not see
#include "asan.h"
#include "file-prefix-map.h" /* add_*_prefix_map() */
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
+
typedef const char *const_char_p; /* For DEF_VEC_P. */
static vec<const_char_p> ignored_options;
@@ -287,7 +286,7 @@ set_default_handlers (struct cl_option_handlers *handlers,
{
handlers->unknown_option_callback = unknown_option_callback;
handlers->wrong_lang_callback = complain_wrong_lang;
- assert(target_option_override_hook);
+ gcc_assert(target_option_override_hook);
handlers->target_option_override_hook = target_option_override_hook;
handlers->num_handlers = 3;
handlers->handlers[0].handler = lang_handle_option;
@@ -315,7 +314,7 @@ decode_options (struct gcc_options *opts, struct gcc_options *opts_set,
lang_mask = initial_lang_mask;
- assert(target_option_override_hook);
+ gcc_assert(target_option_override_hook);
set_default_handlers (&handlers, target_option_override_hook);
default_options_optimization (opts, opts_set,
diff --git a/support/cpp/gcc/opts.cc b/support/cpp/gcc/opts.cc
index c28bf4627..6e397f653 100644
--- a/support/cpp/gcc/opts.cc
+++ b/support/cpp/gcc/opts.cc
@@ -36,8 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "version.h"
#include "selftest.h"
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ <<":" << __func__ << "\n" )
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
// sdcc hack?
// #include "defaults.h"
diff --git a/support/cpp/gcc/prefix.cc b/support/cpp/gcc/prefix.cc
index dcd457088..ddd9acf37 100644
--- a/support/cpp/gcc/prefix.cc
+++ b/support/cpp/gcc/prefix.cc
@@ -73,9 +73,7 @@ License along with GCC; see the file COPYING3. If not see
#include "prefix.h"
#include "common/common-target.h"
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
static const char *std_prefix = PREFIX;
diff --git a/support/cpp/gcc/toplev.cc b/support/cpp/gcc/toplev.cc
index 0b1739502..e07f065b0 100644
--- a/support/cpp/gcc/toplev.cc
+++ b/support/cpp/gcc/toplev.cc
@@ -74,10 +74,8 @@ along with GCC; see the file COPYING3. If not see
//sdcpp #include "ipa-modref.h"
//sdcpp #include "ipa-param-manipulation.h"
#include "dbgcnt.h"
-#include <cassert>
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
+
+#define untested() { fprintf (stderr, "@@#\n@@@:%s:%d:%s\n", __FILE__, __LINE__, __func__); }
//sdcpp
bool flag_wpa = false;
@@ -323,7 +321,7 @@ crash_signal (int signo)
exit (FATAL_EXIT_CODE);
}
- assert(false); // sdcpp
+ gcc_assert(false); // sdcpp
internal_error ("%s", strsignal (signo));
}
@@ -1917,7 +1915,7 @@ lang_dependent_init (const char *name)
input_location = BUILTINS_LOCATION;
if (lang_hooks.init () == 0)
return 0;
- assert(false);
+ gcc_assert(false);
input_location = save_loc;
if (!flag_wpa)
@@ -2225,7 +2223,7 @@ do_compile (bool no_backend)
#endif
/* Set up the back-end if requested. */
- if (!no_backend) { assert(false);
+ if (!no_backend) { gcc_assert(false);
// sdcpp backend_init ();
}
@@ -2401,7 +2399,7 @@ toplev::main (int argc, char **argv)
sets the original filename if appropriate (e.g. foo.i -> foo.c)
so we can correctly initialize debug output. */
bool no_backend = lang_hooks.post_options (&main_input_filename);
- assert(no_backend);
+ gcc_assert(no_backend);
process_options (no_backend);