Advertisement in the GCC mirrors list, again

2015-09-15 Thread niXman


Hi,

mirrors.webhostinggeeks.com/gcc/




Advertisement in the GCC mirrors list

2015-09-09 Thread niXman


Hi,

http://mirrors-ru.go-parts.com/gcc - Online Shop
ftp://mirrors-ru.go-parts.com/gcc - bad
rsync://mirrors-ru.go-parts.com/gcc - bad

http://mirrors-uk.go-parts.com/gcc/ - Online Shop
ftp://mirrors-uk.go-parts.com/gcc - bad
rsync://mirrors-uk.go-parts.com/gcc - bad




Re: Is there any reason to use vfork() ?

2014-05-13 Thread niXman

pinskia 2014-05-13 18:47:

Can you share more information about this env.

This is specially built distributive used for micro-pc.


It might be a bug not in gcc.
I'm sure that the bug not in the GCC. After I wrote to this ML I made 
sure that freezes any program using 'vfork()'. I'll deal with it ...
I just wanted to understand the reasons to use 'vfork()' instead of 
'fork()'.



--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingw-w64/
___
Another online IDE: http://liveworkspace.org/


Is there any reason to use vfork() ?

2014-05-13 Thread niXman


Hi,

I use GCC to some restricted environment.
When I run gcc, it freezes up on this line[1]. When I replace the 
'vfork()' on the 'fork()' the compilation succeeds. I haven't found any 
other adverse events.


I'm curious whether there is reason to use 'vfork()' rather than 
'fork()'?


Thanks.


[1] 
https://gcc.gnu.org/viewcvs/gcc/trunk/libiberty/pex-unix.c?view=markup#l613



manpages:
http://linux.die.net/man/2/fork
http://linux.die.net/man/3/vfork

--
Regards, niXman
___
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingw-w64/
___
Another online IDE: http://liveworkspace.org/


Re: GCC 4.8.0 Release Candidate available from gcc.gnu.org

2013-03-18 Thread niXman
> Can you post test results to the gcc-testresults mailing list?
No. After building, I immediately deleted the built MinGW.


Re: GCC 4.8.0 Release Candidate available from gcc.gnu.org

2013-03-17 Thread niXman
2013/3/17 xunxun:
> Did you test -flto build?
I built MinGW without -flto, but resulting MinGW does not have
problems with LTO. This is strange %)



-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/
___
Another online IDE: http://liveworkspace.org/


Re: GCC 4.8.0 Release Candidate available from gcc.gnu.org

2013-03-17 Thread niXman
2013/3/16 Jakub Jelinek:
> I have so far bootstrapped and tested the release candidate on
> x86_64-linux and i686-linux.  Please test it and report any issues to
> bugzilla.

Also tested i686-w64-mingw32 and x86_64-w64-mingw32 .


-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/
___
Another online IDE: http://liveworkspace.org/


Re: gcc : c++11 : full support : eta?

2013-02-15 Thread niXman
2013/2/16 Franz Fehringer:
> Thanks, looking much better now.
> i am a little confused about it, is it a standard header?

Hi,

Yes:
> If the macro constant __STDC_NO_ATOMICS__(C11) is defined by the compiler, 
> the header , the keyword _Atomic, and all of the names listed 
> here are not provided.

http://en.cppreference.com/w/c/atomic


-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/
___
Another online IDE: http://liveworkspace.org/


Re: Always defined __SEH__ when build from trunk

2012-11-22 Thread niXman
2012/11/22 Kai Tietz:
> Well, __SEH__ is defined for x64 in any case.  There is no way to have
> for x64 no SEH-support - at least not in a way it would work in a
> general way, as SEH is part of the ABI of x64.
I.e. SJLJ can't be used for 4.8(and later)-x86_64?

> I am about to setup a build for testing this.
Thanks in advance.


-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Always defined __SEH__ when build from trunk

2012-11-22 Thread niXman
2012/11/22 niXman:
> I once asked a similar question, but didn't understand, whether sjlj
> use will be available for 4.8?

Because I a few months can not build trunk with sjlj successfully.
I wrote about this in the gcc-help mailing list, I think twice.


-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: Always defined __SEH__ when build from trunk

2012-11-22 Thread niXman
2012/11/22 Kai Tietz:
> Hi,
>
> the cause for this is that SEH exceptions are only present for x64
> 64-bit target.  There is no such support for 32-bit (mainly caused by
> patent issues).  Therefore if you want to build multilib for mingw,
> then please switch back to SjLj-exception mechanism.

I once asked a similar question, but didn't understand, whether sjlj
use will be available for 4.8?


-- 
Regards,
niXman
___
Dual-target(32 & 64-bit) MinGW compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: error when building trunk rev. 190799

2012-09-10 Thread niXman
2012/9/10 Kai Tietz:
> Hi,
>
> well, those failures are caused by -Werror switch.  You should turn it
> off.
You mean '--disable-werror'? If so, then I use this option.

> Nevertheless there is already a bug report about this.  See bug
> 53912 with title "[Bug bootstrap/53912] [4.7/4.8 Regression] bootstrap
> fails using default c++ mode in stage 2 and 3 for native
> x86_64-w64-mingw32"

Thank you!


-- 
Regards,
niXman
___
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


error when building trunk rev. 190799

2012-08-30 Thread niXman
Hello,

I'm not sure about such errors should be reported, but I will try.

Host compiler: gcc-4.7.1-MinGW-x86_64


x86_64-w64-mingw32-g++ -c   -O2 -pipe -fomit-frame-pointer
-momit-leaf-frame-pointer -DIN_GCC   -fno-exceptions -fno-rtti -W
-Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -I.
-Igcc-trunk/gcc -Igcc-trunk/gcc/. -Igcc-trunk/gcc/../include
-Igcc-trunk/gcc/../libcpp/include -I/mingw-gcc-trunk-libs-x64/include
-I/mingw-gcc-trunk-libs-x64/include
-I/mingw-gcc-trunk-libs-x64/include  -Igcc-trunk/gcc/../libdecnumber
-Igcc-trunk/gcc/../libdecnumber/bid -I../libdecnumber
gcc-trunk/gcc/ggc-common.c -o ggc-common.o
gcc-trunk/gcc/ggc-common.c: In function 'int gt_pch_note_object(void*,
void*, gt_note_pointers, gt_types_enum)':
gcc-trunk/gcc/ggc-common.c:326:49: error: cast from 'void*' to 'long
int' loses precision [-fpermissive]
gcc-trunk/gcc/ggc-common.c: In function 'void
gt_pch_note_reorder(void*, void*, gt_handle_reorder)':
gcc-trunk/gcc/ggc-common.c:359:44: error: cast from 'void*' to 'long
int' loses precision [-fpermissive]
gcc-trunk/gcc/ggc-common.c: In function 'hashval_t
saving_htab_hash(const void*)':
gcc-trunk/gcc/ggc-common.c:370:10: error: cast from 'void*' to 'long
int' loses precision [-fpermissive]
gcc-trunk/gcc/ggc-common.c: In function 'void relocate_ptrs(void*, void*)':
gcc-trunk/gcc/ggc-common.c:443:45: error: cast from 'void*' to 'long
int' loses precision [-fpermissive]
gcc-trunk/gcc/ggc-common.c: In function 'void write_pch_globals(const
ggc_root_tab* const*, traversal_state*)':
gcc-trunk/gcc/ggc-common.c:472:42: error: cast from 'void*' to 'long
int' loses precision [-fpermissive]
make[2]: *** [ggc-common.o] Error 1



-- 
Regards,
niXman
___
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: GCC 4.7.2 Status Report (2012-06-14)

2012-06-14 Thread niXman
2012/6/14 Richard Guenther:
> The GCC 4.7.1 release tarballs have been created and are being uploaded
> to ftp.gnu.org right now.

Tell me please, where I can see a list of changes/fixes for GCC-4.7.1?

Thanks!


-- 
Regards,
niXman
___
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Adding the features for preprocessor

2012-06-11 Thread niXman
I want to implement an analog of __ has_include from CLang.
Please tell me, how to get started?


-- 
Regards,
niXman
___
Dual-target(32 & 64 bit) MinGW compilers for 32 and 64 bit Windows:
http://sourceforge.net/projects/mingwbuilds/


Re: how to disable __thiscall on MinGW-gcc-4.7.x ?

2012-05-24 Thread niXman
2012/5/24 Kai Tietz:
> Hmm, no idea.  see revision history on svn for that.  Out of
> curiousity, for what reason you want to revert this patch locally for
> you?
Because of the mismatch of the calling-convention between MinGW and
Clang: http://llvm.org/bugs/show_bug.cgi?id=12684

Thank you for your reply!

-- 
Regards,
  niXman
___
Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts:
  http://sourceforge.net/projects/mingwbuilds/


Re: how to disable __thiscall on MinGW-gcc-4.7.x ?

2012-05-24 Thread niXman
2012/5/24 Kai Tietz:
> There is no option to disable this, as thiscall is part of the Windows
> ABI.

Could you please tell me, in what revision is added this change, so
that I could have made the reverting patch?

> But you can switch via that -mabi=(sysv|ms) option.

I.e. '-mabi = ms' is now used by default?

-- 
Regards,
  niXman
___
Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts:
  http://sourceforge.net/projects/mingwbuilds/


how to disable __thiscall on MinGW-gcc-4.7.x ?

2012-05-24 Thread niXman
Hello!

http://gcc.gnu.org/ml/gcc-help/2012-05/msg00043.html

ping?


-- 
Regards,
  niXman
___
Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts:
  http://sourceforge.net/projects/mingwbuilds/


Re: MPC/MPFR/GMP Usage

2012-05-23 Thread niXman
2012/5/24 Andrew Burks:
> Hey everyone,
>
> I'm using gcc-4.6.3 as part of the YAGARTO toolchain
> (http://www.yagarto.de) with an STM32 ARM Cortex-M3 chip and was
> wondering: what are the math libraries (MPC, MPFR, and GMP) used for?
> Are they only required internally by gcc or are they implicitly added
> to the final binary produced by gcc?
Only for internally using by GCC.


-- 
Regards,
  niXman
___
Dual-target(i686/x86_64) MinGW compiler for i686/x86_64 hosts:
  http://sourceforge.net/projects/mingwbuilds/


Re: Converting GCC to C++ - new branch cxx-conversion

2012-04-11 Thread niXman
2012/4/11 Diego Novillo :
> I have created the SVN branch cxx-conversion to host all the
> mini-projects aimed at exploring the C++ conversion.  Everyone is
> welcome to contribute to it.
>
> The branch has been configured to build in C++ mode by default.
>
> I have also created a wiki page to coordinate conversion efforts
> and document the status of the branch:
>
>             http://gcc.gnu.org/wiki/cxx-conversion
>
> Finally, I've created an entry in http://gcc.gnu.org/svn.html.
>
> The first project that I will start working on is the conversion
> of vec.h and dealing with the garbage allocator.  I am hoping to
> have this ready for the 4.8 release.  Details on the projects'
> wiki.
>
>
> Thanks.  Diego.

Hi,

When building MinGW:
/mingw-build-x32/gcc-4.8.0/./gcc/xgcc
-B/mingw-build-x32/gcc-4.8.0/./gcc/
-L/./mingw-x32/i686-w64-mingw32/lib -L/./mingw-x32/mingw/lib -isystem
/./mingw-x32/i686-w64-mingw32/include -isystem
/./mingw-x32/mingw/include -B/./mingw-x32/i686-w64-mingw32/bin/
-B/./mingw-x32/i686-w64-mingw32/lib/ -isystem
/./mingw-x32/i686-w64-mingw32/include -isystem
/./mingw-x32/i686-w64-mingw32/sys-include-g -O2 -pipe
-fomit-frame-pointer -momit-leaf-frame-pointer
-I/./mingw-libs-x32/include -O2
-I../../../../mingw-src/gcc-4.8.0/libgcc/../winsup/w32api/include -g
-O2 -pipe -fomit-frame-pointer -momit-leaf-frame-pointer
-I/./mingw-libs-x32/include -DIN_GCC   -W -Wall -Wwrite-strings
-Wcast-qual -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition  -isystem ./include   -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector   -I. -I. -I../.././gcc
-I../../../../mingw-src/gcc-4.8.0/libgcc
-I../../../../mingw-src/gcc-4.8.0/libgcc/.
-I../../../../mingw-src/gcc-4.8.0/libgcc/../gcc
-I../../../../mingw-src/gcc-4.8.0/libgcc/../include
-I../../../../mingw-src/gcc-4.8.0/libgcc/config/libbid
-DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS -DUSE_EMUTLS -o _cmpdi2_s.o
-MT _cmpdi2_s.o -MD -MP -MF _cmpdi2_s.dep -DSHARED -DL_cmpdi2 -c
../../../../mingw-src/gcc-4.8.0/libgcc/libgcc2.c
In file included from ../.././gcc/tm.h:16:0,
 from ../../../../mingw-src/gcc-4.8.0/libgcc/libgcc2.c:31:
../.././gcc/options.h:1804:6: warning: null character(s) ignored
[enabled by default]
   int #define flag_inline_functiors_called_once
global_options.x_flag_inline_functions_called_onc(
  ^
../.././gcc/options.h:1814:33: warning: missing terminating "
character [enabled by default]
 #else
 ^
../.././gcc/options.h:1831:4: warning: missing terminating " character
[enabled by default]
   int x_flag_ipa_matrix_reorg;
^
../.././gcc/options.h:1909:22: warning: missing terminating '
character [enabled by default]
 #ifdef GENERATOR_FILE
  ^
../.././gcc/options.h:1942:13: warning: missing terminating "
character [enabled by default]
   int x_flag_leading_underscore;
 ^
../.././gcc/options.h:1840:0: error: unterminated #else
 extern int flag_ipa_pta;
 ^
../.././gcc/options.h:1835:0: error: unterminated #else
 extern int flag_ipa_profile;
 ^
../.././gcc/options.h:1824:0: error: unterminated #else
 extern int flag_ipa_cp_clone;
 ^
../.././gcc/options.h:10:0: error: unterminated #if
 #if !defined(IN_LIBGCC2) && !defined(IN_TARGET_LIBS) && !defined(IN_RTS)
 ^
In file included from ../.././gcc/tm.h:16:0,
 from ../../../../mingw-src/gcc-4.8.0/libgcc/libgcc2.c:31:
../.././gcc/options.h:3:0: error: unterminated #ifndef
 #ifndef OPTIONS_H
 ^
make[2]: *** [_cmpdi2_s.o] Error 1
make[2]: Leaving directory `/mingw-build-x32/gcc-4.8.0/i686-w64-mingw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/mingw-build-x32/gcc-4.8.0'
make: *** [all] Error 2



-- 
Regards,
  niXman


Re: auto/decltype question about implementation

2012-03-11 Thread niXman
2012/3/11 Jonathan Wakely :
> On 11 March 2012 15:32, niXman wrote:
>>> And one more question: in which files/functions I can view the
>>> implementation of auto and decltype?
>
> Search for RID_AUTO and RID_DECLTYPE in gcc/cp/*.c

Thanks Jonathan.

-- 
Regards,
  niXman


Re: auto/decltype question about implementation

2012-03-11 Thread niXman
> Can you please tell, auto is implemented based on the decltype
> implementation with some semantics, or they are two completely
> different implementations?
>
> And one more question: in which files/functions I can view the
> implementation of auto and decltype?


Ping?

-- 
Regards,
  niXman


Re: Trouble with building multilib GCC (MinGW)

2012-03-11 Thread niXman
> As far as I can tell from your original note, your build failed because
> you do not have a 64-bit version of the library -lkernel32.  That is not
> a gcc library.  I assume it is a Windows library.  I don't know if you
> are missing a 64-bit version of the library, or if the bug is that you
> should not be linking against -lkernel32 for a 64-bit build.  E.g.,
> perhaps there is a -lkernel64 on Windows, I don't know.

I have built both versions of CRT for 32 and 64 bit.
32bit CRT in //lib path, and 64bit in //lib64

If you see logfile: http://pastebin.com/KiGHVgVQ then you can see that
for linking 32bit and 64bit libgcc_s_sjlj-1.dll are used 32bit CRT.
If in Makefile for 64bit version I replace //lib with
//lib64 - linking is successfully.
I.e. the problem is that wrong Makefiles are created. I want to understand why?



Ping?


Re: Maybe it's a virus

2012-03-10 Thread niXman
When extracting
ftp://ftp.fu-berlin.de/unix/languages/gcc/releases/gcc-4.6.3/gcc-4.6.3.tar.bz2
http://clip2net.com/clip/m0/1331371739-clip-8kb.png

-- 
Regards,
  niXman


Maybe it's a virus

2012-03-10 Thread niXman
http://clip2net.com/clip/m0/1331370967-clip-7kb.png

-- 
Regards,
  niXman


auto/decltype question about implementation

2012-03-06 Thread niXman
Hi,

Can you please tell, auto is implemented based on the decltype
implementation with some semantics, or they are two completely
different implementations?

And one more question: in which files/functions I can view the
implementation of auto and decltype?

Thanks.

-- 
Regards,
  niXman


Re: implementation of std::thread::hardware_concurrency()

2011-11-09 Thread niXman
Hi Jonathan.
I test your patch on OpenBSD-5.0 and mingw. Everywhere works correctly.

Regards, niXman.


Re: gcc-trunk build error in OpenBSD on stage3

2011-11-08 Thread niXman
> Why is this failing on your system?
Up to now, I've been building GCC on a different machine (the OS
wasn't installed by me). Now, I have installed OpenBSD-5.0 on the VM.


> Look for uses of RPATH_ENVVAR in the top level Makefile.
This line from Makefile:
RPATH_ENVVAR = LD_LIBRARY_PATH


LD_LIBRARY_PATH set to /usr/local/lib
prefix for GCC - /usr/local


Re: gcc-trunk build error in OpenBSD on stage3

2011-11-07 Thread niXman
Diffs between stage2 and stage3.
on configure libiberty for stage3 I see this warnings:


configure:4962: checking for limits.hconfigure:4962:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/xgcc-B/home/root/gcc-build/build/gcc-trunk/./prev-gcc/-B/usr/local/i686-pc-openbsd5.0/bin/-B/usr/local/i686-pc-openbsd5.0/bin/-B/usr/local/i686-pc-openbsd5.0/lib/
-isystem/usr/local/i686-pc-openbsd5.0/include
-isystem/usr/local/i686-pc-openbsd5.0/sys-include    -E
conftest.c/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl11_S_id_ctypeE) size mismatch,
relink 
yourprogram/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl13_S_id_numericE) size mismatch,
relink 
yourprogram/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl13_S_id_collateE) size mismatch,
relink 
yourprogram/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl10_S_id_timeE) size mismatch,
relink 
yourprogram/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl14_S_id_monetaryE) size mismatch,
relink 
yourprogram/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1
: WARNING:symbol(_ZNSt6locale5_Impl14_S_id_messagesE) size mismatch,
relink yourprogram
I have never seen such warnings...Therefore, some tests fail.
--- /home/nixman/config_correct.h
+++ /home/nixman/config_incorrect.h
@@ -54,7 +54,7 @@
 #define HAVE_DECL_CALLOC 1
 
 /* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
-#define HAVE_DECL_FFS 1
+#define HAVE_DECL_FFS 0
 
 /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
@@ -74,7 +74,7 @@
 
 /* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
*/
-#define HAVE_DECL_SBRK 1
+#define HAVE_DECL_SBRK 0
 
 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
@@ -96,7 +96,7 @@
 /* #undef HAVE_DUP3 */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_FCNTL_H 1
+/* #undef HAVE_FCNTL_H */
 
 /* Define to 1 if you have the `ffs' function. */
 #define HAVE_FFS 1
@@ -129,13 +129,13 @@
 #define HAVE_INSQUE 1
 
 /* Define to 1 if the system has the type `intptr_t'. */
-#define HAVE_INTPTR_T 1
+/* #undef HAVE_INTPTR_T */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_INTTYPES_H 1
+/* #undef HAVE_INTTYPES_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_LIMITS_H 1
+/* #undef HAVE_LIMITS_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_MACHINE_HAL_SYSINFO_H */
@@ -159,7 +159,7 @@
 #define HAVE_MEMMOVE 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_MEMORY_H 1
+/* #undef HAVE_MEMORY_H */
 
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
@@ -225,13 +225,13 @@
 /* #undef HAVE_SPAWNVPE */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STDINT_H 1
+/* #undef HAVE_STDINT_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_STDIO_EXT_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STDLIB_H 1
+/* #undef HAVE_STDLIB_H */
 
 /* Define to 1 if you have the `stpcpy' function. */
 /* #undef HAVE_STPCPY */
@@ -252,10 +252,10 @@
 #define HAVE_STRERROR 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STRINGS_H 1
+/* #undef HAVE_STRINGS_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STRING_H 1
+/* #undef HAVE_STRING_H */
 
 /* Define to 1 if you have the `strncasecmp' function. */
 #define HAVE_STRNCASECMP 1
@@ -297,16 +297,16 @@
 #define HAVE_SYS_ERRLIST 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_FILE_H 1
+/* #undef HAVE_SYS_FILE_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_MMAN_H 1
+/* #undef HAVE_SYS_MMAN_H */
 
 /* Define if you have the sys_nerr variable. */
 #define HAVE_SYS_NERR 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_PARAM_H 1
+/* #undef HAVE_SYS_PARAM_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_SYS_PRCTL_H */
@@ -315,16 +315,16 @@
 /* #undef HAVE_SYS_PSTAT_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_RESOURCE_H 1
+/* #undef HAVE_SYS_RESOURCE_H */
 
 /* Define if you have the sys_siglist variable. */
 #define HAVE_SYS_SIGLIST 1
 
 /* Define to 1 if you have the  header file. */
-#de

Re: failure notice

2011-11-07 Thread niXman
Diffs between stage2 and stage3.

on configure libiberty for stage3 I see this warnings:

configure:4962: checking for limits.h
configure:4962:  /home/root/gcc-build/build/gcc-trunk/./prev-gcc/xgcc
-B/home/root/gcc-build/build/gcc-trunk/./prev-gcc/
-B/usr/local/i686-pc-openbsd5.0/bin/
-B/usr/local/i686-pc-openbsd5.0/bin/
-B/usr/local/i686-pc-openbsd5.0/lib/ -isystem
/usr/local/i686-pc-openbsd5.0/include -isystem
/usr/local/i686-pc-openbsd5.0/sys-include-E  conftest.c
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl11_S_id_ctypeE) size mismatch, relink your
program
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl13_S_id_numericE) size mismatch, relink your
program
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl13_S_id_collateE) size mismatch, relink your
program
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl10_S_id_timeE) size mismatch, relink your
program
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl14_S_id_monetaryE) size mismatch, relink your
program
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1:/usr/lib/libstdc++.so.52.0:
/home/root/gcc-build/build/gcc-trunk/./prev-gcc/cc1 : WARNING:
symbol(_ZNSt6locale5_Impl14_S_id_messagesE) size mismatch, relink your
program

I have never seen such warnings...
Therefore, some tests fail.
--- /home/nixman/config_correct.h
+++ /home/nixman/config_incorrect.h
@@ -54,7 +54,7 @@
 #define HAVE_DECL_CALLOC 1
 
 /* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
-#define HAVE_DECL_FFS 1
+#define HAVE_DECL_FFS 0
 
 /* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
*/
@@ -74,7 +74,7 @@
 
 /* Define to 1 if you have the declaration of `sbrk', and to 0 if you don't.
*/
-#define HAVE_DECL_SBRK 1
+#define HAVE_DECL_SBRK 0
 
 /* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
@@ -96,7 +96,7 @@
 /* #undef HAVE_DUP3 */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_FCNTL_H 1
+/* #undef HAVE_FCNTL_H */
 
 /* Define to 1 if you have the `ffs' function. */
 #define HAVE_FFS 1
@@ -129,13 +129,13 @@
 #define HAVE_INSQUE 1
 
 /* Define to 1 if the system has the type `intptr_t'. */
-#define HAVE_INTPTR_T 1
+/* #undef HAVE_INTPTR_T */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_INTTYPES_H 1
+/* #undef HAVE_INTTYPES_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_LIMITS_H 1
+/* #undef HAVE_LIMITS_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_MACHINE_HAL_SYSINFO_H */
@@ -159,7 +159,7 @@
 #define HAVE_MEMMOVE 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_MEMORY_H 1
+/* #undef HAVE_MEMORY_H */
 
 /* Define to 1 if you have the `memset' function. */
 #define HAVE_MEMSET 1
@@ -225,13 +225,13 @@
 /* #undef HAVE_SPAWNVPE */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STDINT_H 1
+/* #undef HAVE_STDINT_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_STDIO_EXT_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STDLIB_H 1
+/* #undef HAVE_STDLIB_H */
 
 /* Define to 1 if you have the `stpcpy' function. */
 /* #undef HAVE_STPCPY */
@@ -252,10 +252,10 @@
 #define HAVE_STRERROR 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STRINGS_H 1
+/* #undef HAVE_STRINGS_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_STRING_H 1
+/* #undef HAVE_STRING_H */
 
 /* Define to 1 if you have the `strncasecmp' function. */
 #define HAVE_STRNCASECMP 1
@@ -297,16 +297,16 @@
 #define HAVE_SYS_ERRLIST 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_FILE_H 1
+/* #undef HAVE_SYS_FILE_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_MMAN_H 1
+/* #undef HAVE_SYS_MMAN_H */
 
 /* Define if you have the sys_nerr variable. */
 #define HAVE_SYS_NERR 1
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_PARAM_H 1
+/* #undef HAVE_SYS_PARAM_H */
 
 /* Define to 1 if you have the  header file. */
 /* #undef HAVE_SYS_PRCTL_H */
@@ -315,16 +315,16 @@
 /* #undef HAVE_SYS_PSTAT_H */
 
 /* Define to 1 if you have the  header file. */
-#define HAVE_SYS_RESOURCE_H 1
+/* #undef HAVE_SYS_RESOURCE_H */
 
 /* Define if you have the sys_siglist variable. */
 #define HAVE_SYS_SIGLIST 1
 
 /* Define to 1 if yo

gcc-trunk build error in OpenBSD on stage3

2011-11-07 Thread niXman
Hi list.
On build gcc-trunk in OpenBSD-5.0 on staget 3 I get the following errors:

if [ x"-fpic" != x ]; then \
  /home/root/gcc-build/build/gcc-trunk/./prev-gcc/xgcc
-B/home/root/gcc-build/build/gcc-trunk/./prev-gcc/
-B/usr/local/i686-pc-openbsd5.0/bin/
-B/usr/local/i686-pc-openbsd5.0/bin/
-B/usr/local/i686-pc-openbsd5.0/lib/ -isystem
/usr/local/i686-pc-openbsd5.0/include -isystem
/usr/local/i686-pc-openbsd5.0/sys-include-c -DHAVE_CONFIG_H -g -O2
 -I. -I../../../src/gcc-trunk/libiberty/../include  -W -Wall
-Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic  -fpic
../../../src/gcc-trunk/libiberty/filename_cmp.c -o pic/filename_cmp.o;
\
else true; fi
../../../src/gcc-trunk/libiberty/fibheap.c: In function 'fibheap_union':
../../../src/gcc-trunk/libiberty/fibheap.c:151:7: warning: implicit
declaration of function 'free' [-Wimplicit-function-declaration]
../../../src/gcc-trunk/libiberty/fibheap.c:151:7: warning:
incompatible implicit declaration of built-in function 'free' [enabled
by default]
../../../src/gcc-trunk/libiberty/fibheap.c:156:7: warning:
incompatible implicit declaration of built-in function 'free' [enabled
by default]
../../../src/gcc-trunk/libiberty/fibheap.c:172:3: warning:
incompatible implicit declaration of built-in function 'free' [enabled
by default]
../../../src/gcc-trunk/libiberty/fibheap.c: In function 'fibheap_extract_min':
../../../src/gcc-trunk/libiberty/fibheap.c:190:7: warning:
incompatible implicit declaration of built-in function 'free' [enabled
by default]
../../../src/gcc-trunk/libiberty/fibheap.c: In function
'fibheap_replace_key_data':
../../../src/gcc-trunk/libiberty/fibheap.c:220:30: error: 'LONG_MIN'
undeclared (first use in this function)
../../../src/gcc-trunk/libiberty/fibheap.c:220:30: note: each
undeclared identifier is reported only once for each function it
appears in
../../../src/gcc-trunk/libiberty/fibheap.c: In function 'fibheap_delete_node':
../../../src/gcc-trunk/libiberty/fibheap.c:261:36: error: 'LONG_MIN'
undeclared (first use in this function)
../../../src/gcc-trunk/libiberty/fibheap.c:265:7: warning: implicit
declaration of function 'abort' [-Wimplicit-function-declaration]
../../../src/gcc-trunk/libiberty/fibheap.c:265:7: warning:
incompatible implicit declaration of built-in function 'abort'
[enabled by default]
../../../src/gcc-trunk/libiberty/fibheap.c: In function 'fibheap_delete':
../../../src/gcc-trunk/libiberty/fibheap.c:277:5: warning:
incompatible implicit declaration of built-in function 'free' [enabled
by default]
../../../src/gcc-trunk/libiberty/fibheap.c: In function 'fibheap_consolidate':
../../../src/gcc-trunk/libiberty/fibheap.c:368:3: warning: implicit
declaration of function 'memset' [-Wimplicit-function-declaration]
../../../src/gcc-trunk/libiberty/fibheap.c:368:3: warning:
incompatible implicit declaration of built-in function 'memset'
[enabled by default]
gmake[3]: *** [fibheap.o] Error 1
gmake[3]: *** Waiting for unfinished jobs
In file included from ../../../src/gcc-trunk/libiberty/filename_cmp.c:27:0:
../../../src/gcc-trunk/libiberty/../include/filenames.h:85:6: error:
unknown type name 'size_t'
../../../src/gcc-trunk/libiberty/filename_cmp.c: In function 'filename_cmp':
../../../src/gcc-trunk/libiberty/filename_cmp.c:55:3: warning:
implicit declaration of function 'strcmp'
[-Wimplicit-function-declaration]
../../../src/gcc-trunk/libiberty/filename_cmp.c: At top level:
../../../src/gcc-trunk/libiberty/filename_cmp.c:109:48: error: unknown
type name 'size_t'
gmake[3]: *** [filename_cmp.o] Error 1
gmake[3]: Leaving directory `/home/root/gcc-build/build/gcc-trunk/libiberty'
gmake[2]: *** [all-stage3-libiberty] Error 2
gmake[2]: Leaving directory `/home/root/gcc-build/build/gcc-trunk'
gmake[1]: *** [stage3-bubble] Error 2
gmake[1]: Leaving directory `/home/root/gcc-build/build/gcc-trunk'
gmake: *** [all] Error 2


stage1 and stage2 pass successfully.

in libiberty/config.h macro HAVE_LIMITS_H is undefined.
any ideas?

Regards, niXman.


Re: Need to correct the function declaration.

2011-11-06 Thread niXman
2011/11/7 niXman :
> 2011/11/7 James Dennett :
>> On Sun, Nov 6, 2011 at 6:55 PM, niXman  wrote:
>>> When I try to build gcc-trunk on OpenBSD-5.0(gcc-4.2.1), I get the
>>> following error:
>>>> gcc-4.6.2/i686-pc-openbsd5.0/libstdc++-v3/include/mutex:818:64: error:
>>>>   invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]
>>>
>>> Please add the void into arguments list for function __once_proxy();,
>>> in file mutex:799.
>>
>> This source file is C++, not C, and so adding "void' should be a no-op.
> This is the extern "C" declaration.
At least adding void solves the problem.

>
>
>>
>> What makes you believe that this is the problem?  Could you show the
>> line where the error occurs?
>>
>> -- James
>>
>


Re: Need to correct the function declaration.

2011-11-06 Thread niXman
2011/11/7 James Dennett :
> On Sun, Nov 6, 2011 at 6:55 PM, niXman  wrote:
>> When I try to build gcc-trunk on OpenBSD-5.0(gcc-4.2.1), I get the
>> following error:
>>> gcc-4.6.2/i686-pc-openbsd5.0/libstdc++-v3/include/mutex:818:64: error:
>>>   invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]
>>
>> Please add the void into arguments list for function __once_proxy();,
>> in file mutex:799.
>
> This source file is C++, not C, and so adding "void' should be a no-op.
This is the extern "C" declaration.


>
> What makes you believe that this is the problem?  Could you show the
> line where the error occurs?
>
> -- James
>


Need to correct the function declaration.

2011-11-06 Thread niXman
When I try to build gcc-trunk on OpenBSD-5.0(gcc-4.2.1), I get the
following error:
> gcc-4.6.2/i686-pc-openbsd5.0/libstdc++-v3/include/mutex:818:64: error:
>   invalid conversion from 'void (*)(...)' to 'void (*)()' [-fpermissive]

Please add the void into arguments list for function __once_proxy();,
in file mutex:799.

Regards, niXman.


Re: implementation of std::thread::hardware_concurrency()

2011-11-01 Thread niXman
> Er, the macro _GLIBCXX_NPROCS already handles
> the case sysconf(_SC_NPROCESSORS_ONLN).
> It looks like you actually want to remove the macro
> _GLIBCXX_NPROCS completely.

Fixed.

diff --git a/libstdc++-v3/src/thread.cc b/libstdc++-v3/src/thread.cc
index 09e7fc5..6feda4d 100644
--- a/libstdc++-v3/src/thread.cc
+++ b/libstdc++-v3/src/thread.cc
@@ -112,10 +112,20 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
   unsigned int
   thread::hardware_concurrency() noexcept
   {
-int __n = _GLIBCXX_NPROCS;
-if (__n < 0)
-  __n = 0;
-return __n;
+int count = 0;
+#if defined(PTW32_VERSION) || \
+   (defined(__MINGW64_VERSION_MAJOR) && defined(_POSIX_THREADS)) || \
+   defined(__hpux)
+count = pthread_num_processors_np();
+#elif defined(__APPLE__) || defined(__FreeBSD__)
+size_t size = sizeof(count);
+sysctlbyname("hw.ncpu", &count, &size, NULL, 0);
+#elif defined(_GLIBCXX_USE_GET_NPROCS) || \
+   defined(_GLIBCXX_USE_SC_NPROCESSORS_ONLN)
+count = _GLIBCXX_NPROCS;
+#endif
+return (count > 0) ? count : 0;
   }

 _GLIBCXX_END_NAMESPACE_VERSION




> Do you have already a Copyright assignment in place?

No. For public domain.


Re: The AST tree modification. Edited.

2011-10-15 Thread niXman
Up.

2011/10/12 niXman :
> Hello!
>
> I have figured out the creation of functions and structures, thanks
> Andi's and Balaji's. Couldn't understand how to create tree for
> template functions, classes, methods.
> Can you help me figure that out, please?
>
> Thanks.
>


ISO_IEC_14882-2011-5.1.2/10 - bug

2011-10-14 Thread niXman
Hello.

Quote from ISO_IEC_14882-2011, 5.1.2/10:
> The identifiers in a capture-list are looked up using the usual rules for 
> unqualified name lookup (3.4.1); each
> such lookup shall find a variable with automatic storage duration declared in 
> the reaching scope of the local
> lambda expression. An entity (i.e. a variable or this) is said to be 
> explicitly captured if it appears in the
> lambda-expression’s capture-list.

But this code successfuly compiled on gcc-4.6.1:
#include 
int main() {
   using std::cout;
   auto f = [&cout]() { cout << 1; }; // <<
   f();
}

http://liveworkspace.org/code/ae698b7daf7b5b531beafd9faaa6a409


But Intel C++ 12.1 says: error : a variable with static storage
duration cannot be captured in a lambda


Thanks.
   niXman.


Re: The AST tree modification. Edited.

2011-10-11 Thread niXman
Hello!

I have figured out the creation of functions and structures, thanks
Andi's and Balaji's. Couldn't understand how to create tree for
template functions, classes, methods.
Can you help me figure that out, please?

Thanks.


Fwd: The AST tree modification. Edited.

2011-10-06 Thread niXman
Thanks Andi, thanks Balaji.

2011/10/7 Andi Hellmund 
>
> Hi,
>
> as an addition to Balaji's answer. Please find attached an extract of a 
> sample front-end generating various types of tree nodes (e.g. arrays, 
> structs, ...). This used to work with an older version of GCC, but I'm not 
> sure if this still works with the most recent version. Anyway, it should give 
> you some pointers for further investigations ...
>
> Best regards,
> Andi
>
>
>> Hello,
>>        For most of the things you are looking for, please look for a 
>> function called build_decl. It is used in several places inside GCC. Let me 
>> give you a small example,
>>
>> If you do the following:
>>
>> tree x = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifer("ii"), 
>> integer_type_node)
>>
>> you will declare a variable called "ii" of type "integer."
>>
>> Similarly, to create a new internal structure, if do something like this:
>>
>> tree struct_frame = lang_hooks.make_type (RECORD_TYPE);
>> tree struct_field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, 
>> get_identifier("variable"), integer_type_node)
>> TREE_CHAIN(struct_field) = struct_frame
>>
>> You will create the following internal structure
>>
>> struct {
>>    int variable;
>> }
>>
>> I hope this helps you get started.
>>
>> Thanks,
>>
>> Balaji V .Iyer.
>>
>> -Original Message-
>> From: niXman [mailto:i.nix...@gmail.com]
>> Sent: Monday, October 03, 2011 6:51 PM
>> To: gcc@gcc.gnu.org
>> Subject: The AST tree modification. Edited.
>>
>> Hi everybody!
>> It is necessary to implement a plug-in for GCC designed to collect the 
>> information on types of translation unit, and generate static const array of 
>> types rtti_ex _ on its base;  //
>> enum class type_ {
>>    char_, uchar_, short_, ushort_, int_, uint_, long_, ulong_,
>>    int64_, uint64_, array_, pointer_, double_, long_double_, float_,
>>    class_
>> };
>>
>> struct rtti_ex_ { //<<<<<<<<<<<<<<<<<<<<<<<<<
>>    const char* name;
>>    const type_ type;
>>    const size_t size;
>>    const size_t align;
>>    const size_t offset;
>> };
>>
>> // generated from plugin.
>> static const rtti_ex_ rtti_ex_array_[] = {
>>    {...},
>>    {...},
>>    {...}
>> };
>> /
>>
>> There aren't any problems with information collection from AST. There is a 
>> complexity with AST modification:
>> 1. How to declare a variable?
>> 2. How to declare the typedef?
>> 3. How to declare a structure?
>> 4. How to declare an array of structures?
>> I suppose that there should be a function like: tree make_subtree (const 
>> char* source); which result I could insert in the corresponding node. But I 
>> haven't found it.
>>
>> Please, give me some links on this subject. It is very desirable, if you 
>> could give some links with examples.
>>
>> Thanks.
>>
>


Re: The AST tree modification. Edited.

2011-10-04 Thread niXman
Hello.
"lang_hooks" - what this? where is declared?
Thanks!


2011/10/5 Iyer, Balaji V 
>
> Hello,
>        For most of the things you are looking for, please look for a function 
> called build_decl. It is used in several places inside GCC. Let me give you a 
> small example,
>
> If you do the following:
>
> tree x = build_decl (UNKNOWN_LOCATION, VAR_DECL, get_identifer("ii"), 
> integer_type_node)
>
> you will declare a variable called "ii" of type "integer."
>
> Similarly, to create a new internal structure, if do something like this:
>
> tree struct_frame = lang_hooks.make_type (RECORD_TYPE);
> tree struct_field = build_decl (UNKNOWN_LOCATION, FIELD_DECL, 
> get_identifier("variable"), integer_type_node)
> TREE_CHAIN(struct_field) = struct_frame
>
> You will create the following internal structure
>
> struct {
>   int variable;
> }
>
> I hope this helps you get started.
>
> Thanks,
>
> Balaji V .Iyer.
>
> -Original Message-
> From: niXman [mailto:i.nix...@gmail.com]
> Sent: Monday, October 03, 2011 6:51 PM
> To: gcc@gcc.gnu.org
> Subject: The AST tree modification. Edited.
>
> Hi everybody!
> It is necessary to implement a plug-in for GCC designed to collect the 
> information on types of translation unit, and generate static const array of 
> types rtti_ex _ on its base;  //
> enum class type_ {
>   char_, uchar_, short_, ushort_, int_, uint_, long_, ulong_,
>   int64_, uint64_, array_, pointer_, double_, long_double_, float_,
>   class_
> };
>
> struct rtti_ex_ { // <<<<<<<<<<<<<<<<<<<<<<<<<
>   const char* name;
>   const type_ type;
>   const size_t size;
>   const size_t align;
>   const size_t offset;
> };
>
> // generated from plugin.
> static const rtti_ex_ rtti_ex_array_[] = {
>   {...},
>   {...},
>   {...}
> };
> /
>
> There aren't any problems with information collection from AST. There is a 
> complexity with AST modification:
> 1. How to declare a variable?
> 2. How to declare the typedef?
> 3. How to declare a structure?
> 4. How to declare an array of structures?
> I suppose that there should be a function like: tree make_subtree (const 
> char* source); which result I could insert in the corresponding node. But I 
> haven't found it.
>
> Please, give me some links on this subject. It is very desirable, if you 
> could give some links with examples.
>
> Thanks.


The AST tree modification. Edited.

2011-10-03 Thread niXman
Hi everybody!
It is necessary to implement a plug-in for GCC designed to collect the
information on types of translation unit, and generate static const
array of types rtti_ex _ on its base;
 //
enum class type_ {
   char_, uchar_, short_, ushort_, int_, uint_, long_, ulong_,
   int64_, uint64_, array_, pointer_, double_, long_double_, float_,
   class_
};

struct rtti_ex_ { // <
   const char* name;
   const type_ type;
   const size_t size;
   const size_t align;
   const size_t offset;
};

// generated from plugin.
static const rtti_ex_ rtti_ex_array_[] = {
   {...},
   {...},
   {...}
};
/

There aren't any problems with information collection from AST. There
is a complexity with AST modification:
1. How to declare a variable?
2. How to declare the typedef?
3. How to declare a structure?
4. How to declare an array of structures?
I suppose that there should be a function like: tree make_subtree
(const char* source); which result I could insert in the corresponding
node. But I haven't found it.

Please, give me some links on this subject. It is very desirable, if
you could give some links with examples.

Thanks.


The AST tree modification.

2011-10-03 Thread niXman
Hi everybody!
It is necessary to implement a plug-in for GCC designed to collect the
information on types of translation unit, and generate static const
array of types rtti_ex _ on its base;
 //
enum class type_ {
   char_, uchar_, short_, ushort_, int_, uint_, long_, ulong_,
   int64_, uint64_, array_, pointer_, double_, long_double_, float_,
   class_
};

struct rtti_ex_ { // <
   const char* name;
   const type_ type;
   const size_t size;
   const size_t align;
   const size_t offset;
};

// generated from plugin.
static const rtti_ex_ rtti_ex_array_[] = {
   {...},
   {...},
   {...}
};
/

There aren't any problems with information collection from AST. There
is a complexity with AST modification:
1. How to declare a variable?
2. How to declare the typedef?
3. How to declare a structure?
4. How to declare an array of structures?
I suppose that there should be a function like: tree make_subtree
(const char* source); which result I could insert in the corresponding
node. But I haven't found it.

Please, give me some links on this subject. It is very desirable, if
you could give some links with examples.

Thanks.