summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-04 15:38:43 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>2012-10-04 15:38:43 +0000
commita115dd2cd61b9394f674b8bd6cb91570607cfc17 (patch)
tree1298c17673de6e773093d7f4c0512bcb6ca503ee
parenta1f1781ae8b54c384b7d193c2fd3ac8efc86932a (diff)
downloadgcc-a115dd2cd61b9394f674b8bd6cb91570607cfc17.tar.gz
* config/darwin.c (darwin_assemble_visibility): Treat
VISIBILITY_INTERNAL as hidden. * config/darwin-c.c (find_subframework_file): Add missing const. (framework_construct_pathname): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@192085 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/config/darwin-c.c4
-rw-r--r--gcc/config/darwin.c4
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C2
5 files changed, 14 insertions, 6 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 959086c98b1..5bffbc4fa05 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+2012-10-04 Jason Merrill <jason@redhat.com>
+
+ * config/darwin.c (darwin_assemble_visibility): Treat
+ VISIBILITY_INTERNAL as hidden.
+
+ * config/darwin-c.c (find_subframework_file): Add missing const.
+ (framework_construct_pathname): Likewise.
+
2012-10-04 Florian Weimer <fweimer@redhat.com>
* doc/cpp.texi (Pragmas): Document #pragma GCC warning, #pragma
diff --git a/gcc/config/darwin-c.c b/gcc/config/darwin-c.c
index a642f66c40d..8e48c30575a 100644
--- a/gcc/config/darwin-c.c
+++ b/gcc/config/darwin-c.c
@@ -267,7 +267,7 @@ static struct framework_header framework_header_dirs[] = {
static char *
framework_construct_pathname (const char *fname, cpp_dir *dir)
{
- char *buf;
+ const char *buf;
size_t fname_len, frname_len;
cpp_dir *fast_dir;
char *frname;
@@ -344,7 +344,7 @@ find_subframework_file (const char *fname, const char *pname)
{
char *sfrname;
const char *dot_framework = ".framework/";
- char *bufptr;
+ const char *bufptr;
int sfrname_len, i, fname_len;
struct cpp_dir *fast_dir;
static struct cpp_dir subframe_dir;
diff --git a/gcc/config/darwin.c b/gcc/config/darwin.c
index 54c92d16b75..5a9f50a9fdb 100644
--- a/gcc/config/darwin.c
+++ b/gcc/config/darwin.c
@@ -2623,7 +2623,7 @@ darwin_assemble_visibility (tree decl, int vis)
{
if (vis == VISIBILITY_DEFAULT)
;
- else if (vis == VISIBILITY_HIDDEN)
+ else if (vis == VISIBILITY_HIDDEN || vis == VISIBILITY_INTERNAL)
{
fputs ("\t.private_extern ", asm_out_file);
assemble_name (asm_out_file,
@@ -2631,7 +2631,7 @@ darwin_assemble_visibility (tree decl, int vis)
fputs ("\n", asm_out_file);
}
else
- warning (OPT_Wattributes, "internal and protected visibility attributes "
+ warning (OPT_Wattributes, "protected visibility attribute "
"not supported in this configuration; ignored");
}
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
index 4300d1ab16a..b8133909a7f 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
@@ -1,7 +1,7 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
/* { dg-require-visibility "internal" } */
-/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
+/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } { ! *-*-darwin* } } } }*/
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
#pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
index f566cd2f419..3ceaf4a2523 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
@@ -1,7 +1,7 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
/* { dg-require-visibility "internal" } */
-/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
+/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } { ! *-*-darwin* } } } } */
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
#pragma GCC visibility push(hidden)