News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

The 16 November 2013 build (9455) is out.

Started by killerbot, November 16, 2013, 07:59:18 PM

Previous topic - Next topic

Alpha

Quote from: ToApolytoXaos on November 19, 2013, 11:37:53 AM
I have tried this and apart from the old problem [...]
Did the setting resolve your old problem?

Quote from: ToApolytoXaos on November 19, 2013, 11:37:53 AM
[...] a new issue appeared; it displays the same available keyword twice and still insists to concatenate the word right after colon.
My apologies, but I do not understand your description.  Could you try to explain it again?

ToApolytoXaos

Quote from: Alpha on November 22, 2013, 06:00:20 AM
Did the setting resolve your old problem?
Nope, I'm afraid I haven't.

Quote from: Alpha on November 22, 2013, 06:00:20 AM
My apologies, but I do not understand your description.  Could you try to explain it again?
I did what you have suggested (with Fill up characters) and now it duplicates the goto label twice in auto-completion popped up window while the old issue remains the same.

killerbot

"-Wno-unused-local-typedefs" , yes, ensure for sure that one can remain, cause this one is a warning exploder for wx, boost , ...

ollydbg

Quote from: stahta01 on November 22, 2013, 04:45:12 AM
Quote from: ollydbg on November 22, 2013, 01:29:14 AM
I see this error: (see screen shot below)


It happens when I open a simple wx2.8.12 project(from wx wizard), or press the build button.



Have any CB project in the past used two scripts in the Compiler other options before?

I think two does NOT work; I deleted either one and the error went away on the next project re-build.

Tim S.

Thank Tim, indeed, I see that the compiler options has such code:

-pipe
-mthreads
[[if (PLATFORM == PLATFORM_MSW && (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.0.0"))) print(_T("-Wno-attributes"));]]
[[if (GetCompilerFactory().GetCompilerVersionString(_T("gcc")) >= _T("4.8.0")) print(_T("-Wno-unused-local-typedefs"));]]
-Winvalid-pch
-include wx_pch.h


@Alpha:
I don't know the reason we need "-Wno-attributes" options.
I do know that "-Wno-unused-local-typedefs" was used to remove build warnings.


If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Alpha

-Wno-attributes came from rev 4596:

http://cb.biplab.in/websvn/log.php?repname=codeblocks&path=%2F&isdir=1&peg=9462&sr=4596&er=1&max=1&search=

I have removed -Wno-attributes from the wizard in trunk now, as -Wno-unused-local-typedefs looks to be currently a much more useful command.

dmoore

Quote from: Alpha on November 22, 2013, 09:56:23 PM
-Wno-attributes came from rev 4596:

http://cb.biplab.in/websvn/log.php?repname=codeblocks&path=%2F&isdir=1&peg=9462&sr=4596&er=1&max=1&search=

I have removed -Wno-attributes from the wizard in trunk now, as -Wno-unused-local-typedefs looks to be currently a much more useful command.

Why don't we have check boxes for these -W flags in compiler settings?
Python plugins: [url="https://github.com/spillz/codeblocks-python"]https://github.com/spillz/codeblocks-python[/url]
Code::Blocks Daily Builds -- Ubuntu PPA: [url="https://launchpad.net/~damien-moore/+archive/codeblocks"]https://launchpad.net/~damien-moore/+archive/codeblocks[/url]

MortenMacFly

Quote from: dmoore on November 22, 2013, 10:06:42 PM
Why don't we have check boxes for these -W flags in compiler settings?
Seems nobody configured it in the related XML compiler settings.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

Alpha

Quote from: MortenMacFly on November 22, 2013, 10:44:24 PM
Quote from: dmoore on November 22, 2013, 10:06:42 PM
Why don't we have check boxes for these -W flags in compiler settings?
Seems nobody configured it in the related XML compiler settings.
During the conversion to XML, I pretty much tried to do a straight copy of what existed.  My personal opinion is that there are already too many flags, and that uncommon/special case flags are better suited to be manually entered.
Do note that the GUI does support Right click->New flag, so if you want your local version to have more flags, it is as easy as that.

MortenMacFly

Quote from: Alpha on November 25, 2013, 04:21:45 AM
Do note that the GUI does support Right click->New flag, so if you want your local version to have more flags, it is as easy as that.
Sure thing, but as (at least) -Wno-unused-local-typedefs is relevant to wxWidgets it should be natively supported.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

ToApolytoXaos

I went to Create a new project, right-click on GTK+ project, then Edit this script. The file opens in new tab window; I switch from Code::Blocks to Firefox using Alt+TAB, I come back to Code::Blocks and I get



Is this normal, or I hit a bug?

P.S.: Special thanks goes to @oBFusCATed for his reply to this request; if I have found a bug, he should get the credit for this :D

http://forums.next.codeblocks.org/index.php/topic,18620.msg127477.html#msg127477

oBFusCATed

Quote from: ToApolytoXaos on November 25, 2013, 02:30:00 PM
Is this normal, or I hit a bug?
Yes, I think it is normal, but I don't know if this is a good behaviour.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ToApolytoXaos

Currently compiled svn9468 on Windows 7 machine (at work) and auto-completion does not work properly.

As soon as I insert (*prd->st_info)->, instead of seeing the desired variables, I see whatever prd
has in it.

See the entire sample below:

Code (C) Select

/*
* Placed in Public Domain where applicable permitted by law.
* USE IT AT YOUR OWN RISK!
*/
#include <stdio.h>
#include <stdlib.h>

#define nil ((void *)0)

typedef struct {
   int postal_code;
   const char *address;
} street_info_t;

typedef struct {
   street_info_t **st_info;
   const char *company_name;
} generic_t;

street_info_t * str_constructor(void) {
   street_info_t *tmp = (street_info_t *) malloc(sizeof(street_info_t));
   if (tmp == nil) {
       return nil;
   }
   return tmp;
}

void str_destructor(street_info_t **self) {
   if (*self != nil) {
       free(*self);
       *self = nil;
   }
   return;
}

generic_t * constructor(void) {
   generic_t *tmp = (generic_t *) malloc(sizeof(generic_t));
   if (tmp == nil) {
       return nil;
   }
   return tmp;
}

void destructor(generic_t **self) {
   if (*self != nil) {
       free(*self);
       *self = nil;
   }
   return;
}

int main(void)
{
   generic_t *prd = constructor();
   street_info_t *street = str_constructor();

   prd->st_info = &street;
   prd->company_name = "Disney Land";
   (*prd->st_info)->address = "Mikey Mouse avenue, Neverland";
   (*prd->st_info)->postal_code = 1010;

   printf("Company Name: %s\n", prd->company_name);
   printf("Address: %s\n", (*prd->st_info)->address);
   printf("Postal code: %d\n", (*prd->st_info)->postal_code);

   str_destructor(&street);
   prd->st_info = nil;

   destructor(&prd);

   return 0;
}

oBFusCATed

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

ollydbg

@ToApolytoXaos, If I remember correctly, we don't handle the parentheses correctly in CC. (It need some kind of operator precedence parsing of the statement, but currently we don't have this feature)
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

ToApolytoXaos

#44
Ah OK, no worries. So it's not a bug, but a lack of feature :) nice. Also, should not be logical to offer only C keywords if you use a project as C, unless it's used in C++ as extern C? Most of the times I get full list of unnecessary keyword tags.