From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 68354 invoked by alias); 16 Mar 2015 07:15:16 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 68344 invoked by uid 89); 16 Mar 2015 07:15:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KAM_FROM_URIBL_PCCC,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: mail-pd0-f172.google.com Received: from mail-pd0-f172.google.com (HELO mail-pd0-f172.google.com) (209.85.192.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 16 Mar 2015 07:15:14 +0000 Received: by pdnc3 with SMTP id c3so50335447pdn.0 for ; Mon, 16 Mar 2015 00:15:12 -0700 (PDT) X-Received: by 10.66.147.169 with SMTP id tl9mr132456188pab.63.1426490112875; Mon, 16 Mar 2015 00:15:12 -0700 (PDT) Received: from [192.168.1.104] ([115.199.128.78]) by mx.google.com with ESMTPSA id sm5sm15602480pac.10.2015.03.16.00.15.09 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 16 Mar 2015 00:15:11 -0700 (PDT) Message-ID: <55068495.5040205@gmail.com> Date: Mon, 16 Mar 2015 07:15:00 -0000 From: asmwarrior User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: Pedro Alves , GDB Patches Subject: Re: [all pushed] Re: [PATCH 00/36] Support building GDB as a C++ program References: <1423524046-20605-1-git-send-email-palves@redhat.com> <54F0B52F.1050909@redhat.com> <54FB20E2.2040403@redhat.com> <54FB3C58.6050702@redhat.com> <550660C5.2060009@gmail.com> <5506661C.1040103@gmail.com> <55066A29.8090200@gmail.com> In-Reply-To: <55066A29.8090200@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-03/txt/msg00438.txt.bz2 On 2015-3-16 13:29, asmwarrior wrote: > Now I see another build error which I don't know how to fix it. > > g++ -fpermissive -O0 -g -D__USE_MINGW_ACCESS -I. -I../../binutils-gdb/gdb -I../../binutils-gdb/gdb/common -I../../binutils-gdb/gdb/config -DLOCALEDIR="\"/mingw/share/locale\"" -DHAVE_CONFIG_H -I../../binutils-gdb/gdb/../include/opcode -I../../binutils-gdb/gdb/../opcodes/.. -I../../binutils-gdb/gdb/../readline/.. -I../bfd -I../../binutils-gdb/gdb/../bfd -I../../binutils-gdb/gdb/../include -I../libdecnumber -I../../binutils-gdb/gdb/../libdecnumber -I../../binutils-gdb/gdb/gnulib/import -Ibuild-gnulib/import -I/mingw/include -IE:/code/python27/include -IE:/code/python27/include -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wno-sign-compare -Wno-write-strings -Wno-narrowing -Wno-format -c -o dcache.o -MT dcache.o -MMD > -MP -MF .deps/dcache.Tpo ../../binutils-gdb/gdb/dcache.c > In file included from ../../binutils-gdb/gdb/../include/splay-tree.h:43:0, > from ../../binutils-gdb/gdb/dcache.c:26: > build-gnulib/import/inttypes.h:57:3: error: #error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." > # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." > ^ > > I use 32bit Windows, 32 bit GCC compiler(MinGW-Build GCC 4.8.2) > The error comes from: inttypes.h, which is under my build directory: F:\build_gdb\mybuildcpp\gdb\build-gnulib\import It has: #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif I use some hack to see/print what's the value of those four macro definitions. Methods comes from: http://stackoverflow.com/a/10227059/154911 so change code to #if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX) /* definition to expand macro then apply to pragma message */ #define VALUE_TO_STRING(x) #x #define VALUE(x) VALUE_TO_STRING(x) #define VAR_NAME_VALUE(var) #var "=" VALUE(var) #pragma message(VAR_NAME_VALUE(INT_MAX)) #pragma message(VAR_NAME_VALUE(INT32_MAX)) #pragma message(VAR_NAME_VALUE(INT_MIN)) #pragma message(VAR_NAME_VALUE(INT32_MIN)) # error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to ." #endif Then I just run the command line, add "-E" to the command line, also remove the "-o .....", I get the result: #pragma message("INT_MAX" "=" "2147483647") #pragma message("INT32_MAX" "=" "INT32_MAX") #pragma message("INT_MIN" "=" "(-2147483647 - 1)") #pragma message("INT32_MIN" "=" "INT32_MIN") It turns out that INT32_MIN and INT32_MAX is not defined. Question: where do I need to add those definitions of INT32_MIN and INT32_MAX?