[Bug libmudflap/44661] Link order (?) might cause threaded libmudflap to assert

2010-07-22 Thread davi dot arnaut at sun dot com


--- Comment #4 from davi dot arnaut at sun dot com  2010-07-22 10:54 ---
Let's get it documented? One sentence should do. I think it's pertinent because
-lpthread will most of the time come before user supplied compiler flags.


-- 

davi dot arnaut at sun dot com changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661



[Bug c++/44619] New: Bogus set but not used when using pointer to member operators

2010-06-21 Thread davi dot arnaut at sun dot com
host:~$ cat bogus.cpp 
struct S { int x, y; };

int main(int argc, char *argv[])
{
  struct S foo;
  int S::*bar = &S::x;
  foo.*bar = 5;
  return foo.*bar;
}
host:~$ g++ -o bogus bogus.cpp -Wunused
bogus.cpp: In function 'int main(int, char**)':
bogus.cpp:5:12: warning: variable 'foo' set but not used
[-Wunused-but-set-variable]
bogus.cpp:6:11: warning: variable 'bar' set but not used
[-Wunused-but-set-variable]
host:~$ g++ --version
g++ (Ubuntu 20100530-0ubuntu1) 4.6.0 20100530 (experimental) [trunk revision
160047]


-- 
   Summary: Bogus set but not used when using pointer to member
operators
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: davi dot arnaut at sun dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44619



[Bug libmudflap/44661] New: Link order (?) might cause threaded libmudflap to assert

2010-06-24 Thread davi dot arnaut at sun dot com
Tweaking the order of library names might cause the mudflap runtime to assert.

$ cat foo.c 
#include 
#include 
#include 

static void *routine(void* arg)
{
  pthread_t thr = pthread_self();
  printf("foo %d\n", 1);
  return NULL;
}

int main()
{
  pthread_t thr;
  pthread_create(&thr, NULL, routine, NULL);
  pthread_join(thr, NULL);
  return 0;
}

$ gcc -o foo foo.c  -fmudflapth -lpthread -lmudflapth 
$ ./foo 
mf: erroneous reentrancy detected in `__mf_check'
Aborted (core dumped)
$ gcc -o foo foo.c  -fmudflapth -lmudflapth -lpthread
$ ./foo 
foo 1

g++ (Ubuntu 20100621-0ubuntu1) 4.6.0 20100621 (experimental) [trunk revision
161065]
GNU gold (GNU Binutils for Ubuntu 2.20.51-system.20100617) 1.9


-- 
   Summary: Link order (?) might cause threaded libmudflap to assert
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libmudflap
AssignedTo: unassigned at gcc dot gnu dot org
    ReportedBy: davi dot arnaut at sun dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44661



[Bug preprocessor/44836] New: Missing headers are always fatal

2010-07-06 Thread davi dot arnaut at sun dot com
MySQL relied on the behavior fixed in PR15638 to implement a poor man's ABI
check.

By keeping a copy of the preprocessed output, it was somewhat possible to
detect (via a diff) whether a change to some header might affect the ABI. MySQL
headers are a bit convoluted, being used by client programs and the server
itself.

Although not entirely reliable, this behavior was quite useful for this
purpose. Would it possible to somehow instruct cpp to continue even if a header
is missing? Something along the lines of a -Wno-fatal-errors... or restore the
behavior if cpp is invoked directly.


-- 
   Summary: Missing headers are always fatal
   Product: gcc
   Version: 4.6.0
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: preprocessor
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: davi dot arnaut at sun dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836