+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
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;
{
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;
{
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,
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");
}
/* 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)
/* 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)