summaryrefslogtreecommitdiff
path: root/support/cpp/gcc
diff options
context:
space:
mode:
authorepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>2022-11-26 06:59:44 +0000
committerepetrich <epetrich@4a8a32a2-be11-0410-ad9d-d568d2c75423>2022-11-26 06:59:44 +0000
commit152d6555fb20ed2bf5d29a34a9f745b4b97e5f2f (patch)
tree48f5a8462c9b4d7ce0303661168057c65be76a41 /support/cpp/gcc
parent8289326a018c5e62bc20c1987b5b492ef0512c8f (diff)
* support/cpp/gcc/gcc.cc,
support/cpp/gcc/opts.cc, support/cpp/gcc/opts-common.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: move iostream header last to avoid inconsistent struct offsets and thus segfaults git-svn-id: http://svn.code.sourceforge.net/p/sdcc/code/trunk/sdcc@13752 4a8a32a2-be11-0410-ad9d-d568d2c75423
Diffstat (limited to 'support/cpp/gcc')
-rw-r--r--support/cpp/gcc/c-family/c-opts.cc8
-rw-r--r--support/cpp/gcc/c-family/c-ppoutput.cc6
-rw-r--r--support/cpp/gcc/gcc.cc6
-rw-r--r--support/cpp/gcc/opts-common.cc7
-rw-r--r--support/cpp/gcc/opts.cc5
-rw-r--r--support/cpp/gcc/prefix.cc7
-rw-r--r--support/cpp/gcc/toplev.cc6
7 files changed, 24 insertions, 21 deletions
diff --git a/support/cpp/gcc/c-family/c-opts.cc b/support/cpp/gcc/c-family/c-opts.cc
index ca7ce55d8..e7ea46081 100644
--- a/support/cpp/gcc/c-family/c-opts.cc
+++ b/support/cpp/gcc/c-family/c-opts.cc
@@ -18,10 +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 <map> // BUG?
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
#include "config.h"
#include "system.h"
@@ -48,6 +44,10 @@ 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" )
#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 bd1cd555a..ccf8b9e83 100644
--- a/support/cpp/gcc/c-family/c-ppoutput.cc
+++ b/support/cpp/gcc/c-family/c-ppoutput.cc
@@ -16,9 +16,6 @@
along with this program; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
#include "config.h"
#include "system.h"
@@ -28,6 +25,9 @@
#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" )
/* 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 3b27f49cc..4737a7935 100644
--- a/support/cpp/gcc/gcc.cc
+++ b/support/cpp/gcc/gcc.cc
@@ -27,9 +27,6 @@ CC recognizes how to compile each input file by suffixes in the file names.
Once it knows which kind of compilation to perform, the procedure for
compilation is specified by a string called a "spec". */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
#include "config.h"
#include "system.h"
@@ -49,6 +46,9 @@ compilation is specified by a string called a "spec". */
#include "spellcheck.h"
#include <cassert>
+#include <iostream>
+#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
+ <<":" << __func__ << "\n" )
// sdcpp
extern bool flag_wpa;
diff --git a/support/cpp/gcc/opts-common.cc b/support/cpp/gcc/opts-common.cc
index 19ef1889b..08ff64fed 100644
--- a/support/cpp/gcc/opts-common.cc
+++ b/support/cpp/gcc/opts-common.cc
@@ -17,9 +17,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 "config.h"
#include "system.h"
#include "intl.h"
@@ -29,6 +26,10 @@ 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" )
+
+
static void prune_options (struct cl_decoded_option **, unsigned int *);
/* An option that is undocumented, that takes a joined argument, and
diff --git a/support/cpp/gcc/opts.cc b/support/cpp/gcc/opts.cc
index 9b04ab48a..c28bf4627 100644
--- a/support/cpp/gcc/opts.cc
+++ b/support/cpp/gcc/opts.cc
@@ -18,8 +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 "config.h"
#include "system.h"
@@ -38,6 +36,9 @@ 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" )
+
// sdcc hack?
// #include "defaults.h"
diff --git a/support/cpp/gcc/prefix.cc b/support/cpp/gcc/prefix.cc
index c6b4124d1..dcd457088 100644
--- a/support/cpp/gcc/prefix.cc
+++ b/support/cpp/gcc/prefix.cc
@@ -63,9 +63,6 @@ License along with GCC; see the file COPYING3. If not see
advapi32.dll. */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
#include "config.h"
#include "system.h"
@@ -76,6 +73,10 @@ 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" )
+
static const char *std_prefix = PREFIX;
static const char *get_key_value (char *);
diff --git a/support/cpp/gcc/toplev.cc b/support/cpp/gcc/toplev.cc
index 4d0214ced..0b1739502 100644
--- a/support/cpp/gcc/toplev.cc
+++ b/support/cpp/gcc/toplev.cc
@@ -22,9 +22,6 @@ along with GCC; see the file COPYING3. If not see
in the proper order, and counts the time used by each.
Error messages and low-level interface to malloc also handled here. */
-#include <iostream>
-#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
- <<":" << __func__ << "\n" )
#include "config.h"
#include "system.h"
#include "coretypes.h"
@@ -78,6 +75,9 @@ along with GCC; see the file COPYING3. If not see
//sdcpp #include "ipa-param-manipulation.h"
#include "dbgcnt.h"
#include <cassert>
+#include <iostream>
+#define untested() ( std::cerr << "@@#\n@@@:"<< __FILE__ << ":"<< __LINE__ \
+ <<":" << __func__ << "\n" )
//sdcpp
bool flag_wpa = false;