]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/c/ChangeLog
ipa-inline-analysis.c (check_callers): Check node->can_remove_if_no_direct_calls_and_...
[thirdparty/gcc.git] / gcc / c / ChangeLog
CommitLineData
e5165b60
MP
12015-02-27 Marek Polacek <polacek@redhat.com>
2
3 PR c/65228
4 * c-decl.c (start_decl): Return NULL_TREE if decl is an error node.
5
065d214c
MP
62015-02-14 Marek Polacek <polacek@redhat.com>
7
8 PR c/64768
9 * c-decl.c (grokdeclarator): Set the range of a flexible array member
10 declared through a typedef name.
11
e5d9235b
MP
122015-02-13 Marek Polacek <polacek@redhat.com>
13
14 PR c/65050
15 * c-decl.c (grokdeclarator): Print also the type when giving
16 the error message about array's incomplete element type.
17
fa01ffcc
JJ
182015-02-11 Jakub Jelinek <jakub@redhat.com>
19
20 PR c/64824
21 * c-parser.c (c_parser_binary_expression): Fix OpenMP stack[sp].prec
22 check in the POP macro.
23
c3e38a03
MP
242015-02-09 Marek Polacek <polacek@redhat.com>
25
26 PR c/64856
27 * c-typeck.c (process_init_element): Don't always wrap
28 COMPOUND_LITERAL_EXPR in a SAVE_EXPR in C99 mode when
29 initializing a range of elements.
30
4886ec8e
JJ
312015-02-04 Jakub Jelinek <jakub@redhat.com>
32
33 PR c/64824
34 PR c/64868
35 * c-parser.c (c_parser_omp_atomic): Handle RDIV_EXPR.
36
c3e38a03 372015-02-02 Bruno Loff <bruno.loff@gmail.com>
a4bb6959
BL
38
39 * c-parser.c (c_parser_declspecs): Call invoke_plugin_callbacks after
40 processing enum declaration.
41
7b33f0c8
MP
422015-01-29 Marek Polacek <polacek@redhat.com>
43
44 PR c/64709
45 * c-typeck.c (pop_init_level): If constructor_elements has
46 exactly one element with integer_zerop value, set constructor_zeroinit
47 to 1. Remove braces around warning_init call.
48
dea63e49
JJ
492015-01-27 Jakub Jelinek <jakub@redhat.com>
50
51 PR c/64766
52 * c-typeck.c (store_init_value): Don't overwrite DECL_INITIAL
53 of FUNCTION_DECLs with error_mark_node.
54
d38f7dce
JJ
552015-01-26 Jakub Jelinek <jakub@redhat.com>
56
57 PR c/64778
58 * c-typeck.c (convert_arguments): Return -1 if there are
59 error_args, even if we've diagnosed too many arguments.
60
cbf5d0e7
RB
612015-01-21 Richard Biener <rguenther@suse.de>
62
63 PR middle-end/64313
64 * c-decl.c (merge_decls): Call set_builtin_decl_declared_p
65 for builtins the user declared correctly.
66
41dbbb37
TS
672015-01-15 Thomas Schwinge <thomas@codesourcery.com>
68 Bernd Schmidt <bernds@codesourcery.com>
69 Cesar Philippidis <cesar@codesourcery.com>
70 James Norris <jnorris@codesourcery.com>
71 Jakub Jelinek <jakub@redhat.com>
72 Ilmir Usmanov <i.usmanov@samsung.com>
73
74 * c-parser.c: Include "gomp-constants.h".
75 (c_parser_omp_clause_map): Use enum gomp_map_kind instead of enum
76 omp_clause_map_kind. Use GOMP_MAP_* instead of OMP_CLAUSE_MAP_*.
77 Use OMP_CLAUSE_SET_MAP_KIND.
78 (c_parser_pragma): Handle PRAGMA_OACC_ENTER_DATA,
79 PRAGMA_OACC_EXIT_DATA, PRAGMA_OACC_UPDATE.
80 (c_parser_omp_construct): Handle PRAGMA_OACC_CACHE,
81 PRAGMA_OACC_DATA, PRAGMA_OACC_KERNELS, PRAGMA_OACC_LOOP,
82 PRAGMA_OACC_PARALLEL, PRAGMA_OACC_WAIT.
83 (c_parser_omp_clause_name): Handle "auto", "async", "copy",
84 "copyout", "create", "delete", "deviceptr", "gang", "host",
85 "num_gangs", "num_workers", "present", "present_or_copy", "pcopy",
86 "present_or_copyin", "pcopyin", "present_or_copyout", "pcopyout",
87 "present_or_create", "pcreate", "seq", "self", "vector",
88 "vector_length", "wait", "worker".
89 (OACC_DATA_CLAUSE_MASK, OACC_KERNELS_CLAUSE_MASK)
90 (OACC_ENTER_DATA_CLAUSE_MASK, OACC_EXIT_DATA_CLAUSE_MASK)
91 (OACC_LOOP_CLAUSE_MASK, OACC_PARALLEL_CLAUSE_MASK)
92 (OACC_UPDATE_CLAUSE_MASK, OACC_WAIT_CLAUSE_MASK): New macros.
93 (c_parser_omp_variable_list): Handle OMP_CLAUSE__CACHE_.
94 (c_parser_oacc_wait_list, c_parser_oacc_data_clause)
95 (c_parser_oacc_data_clause_deviceptr)
96 (c_parser_omp_clause_num_gangs, c_parser_omp_clause_num_workers)
97 (c_parser_oacc_clause_async, c_parser_oacc_clause_wait)
98 (c_parser_omp_clause_vector_length, c_parser_oacc_all_clauses)
99 (c_parser_oacc_cache, c_parser_oacc_data, c_parser_oacc_kernels)
100 (c_parser_oacc_enter_exit_data, c_parser_oacc_loop)
101 (c_parser_oacc_parallel, c_parser_oacc_update)
102 (c_parser_oacc_wait): New functions.
103 * c-tree.h (c_finish_oacc_parallel, c_finish_oacc_kernels)
104 (c_finish_oacc_data): New prototypes.
105 * c-typeck.c: Include "gomp-constants.h".
106 (handle_omp_array_sections): Handle GOMP_MAP_FORCE_DEVICEPTR. Use
107 GOMP_MAP_* instead of OMP_CLAUSE_MAP_*. Use
108 OMP_CLAUSE_SET_MAP_KIND.
109 (c_finish_oacc_parallel, c_finish_oacc_kernels)
110 (c_finish_oacc_data): New functions.
111 (c_finish_omp_clauses): Handle OMP_CLAUSE__CACHE_,
112 OMP_CLAUSE_NUM_GANGS, OMP_CLAUSE_NUM_WORKERS,
113 OMP_CLAUSE_VECTOR_LENGTH, OMP_CLAUSE_ASYNC, OMP_CLAUSE_WAIT,
114 OMP_CLAUSE_AUTO, OMP_CLAUSE_SEQ, OMP_CLAUSE_GANG,
115 OMP_CLAUSE_WORKER, OMP_CLAUSE_VECTOR, and OMP_CLAUSE_MAP's
116 GOMP_MAP_FORCE_DEVICEPTR.
117
adfac8df
JJ
1182015-01-09 Michael Collison <michael.collison@linaro.org>
119
120 * c-array-notation.c: Include hash-set.h, machmode.h,
121 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
122 fold-const.h, wide-int.h, and inchash.h due to flattening of tree.h.
123 * c-aux-info.c: Ditto.
124 * c-convert.c: Ditto.
125 * c-decl.c: Ditto.
126 * c-errors.c: Ditto.
127 * c-lang.c: Dittoxs.
128 * c-objc-common.c: Ditto.
129 * c-parser.c: Ditto.
130 * c-typeck.c: Include hash-set.h, machmode.h,
131 vec.h, double-int.h, input.h, alias.h, symtab.h, options.h
132 fold-const.h, wide-int.h, inchash.h, real.h and
133 fixed-value.h due to flattening of tree.h.
134
2cc901dc
MP
1352015-01-07 Marek Polacek <polacek@redhat.com>
136
137 PR c/64417
138 * c-typeck.c (process_init_element): Disallow initialization of
139 a flexible array member with a string constant if the structure
140 is in an array.
141
5624e564
JJ
1422015-01-05 Jakub Jelinek <jakub@redhat.com>
143
e5341100
JJ
144 PR sanitizer/64344
145 * c-typeck.c (convert_for_assignment, c_finish_return): For
146 -fsanitize=float-cast-overflow casts from REAL_TYPE to integer/enum
147 types also set in_late_binary_op around convert call.
148 * c-convert.c (convert): For -fsanitize=float-cast-overflow REAL_TYPE
149 to integral type casts, if not in_late_binary_op, pass c_fully_fold
150 result on expr as last argument to ubsan_instrument_float_cast,
151 if in_late_binary_op, don't use c_save_expr but save_expr.
152
5624e564
JJ
153 Update copyright years.
154
5bd012f8
MP
1552015-01-05 Marek Polacek <polacek@redhat.com>
156
157 PR c/64423
158 * c-typeck.c (build_array_ref): Pass loc down to
159 warn_array_subscript_with_type_char.
160
768952be
MU
1612014-12-20 Martin Uecker <uecker@eecs.berkeley.edu>
162
163 * c-typeck.c: New behavious for pointers to arrays with qualifiers
164 (common-pointer-type): For pointers to arrays take qualifiers from
165 element type.
166 (build_conditional_expr): Add warnings for lost qualifiers.
167 (comp-target-types): Allow pointers to arrays with different qualifiers.
168 (convert-for-assignment): Adapt warnings for discarded qualifiers. Add
169 WARNING_FOR_QUALIFIERS macro and rename WARN_FOR_QUALIFIERS
170 to PEDWARN_FOR_QUALIFIERS.
171
8f94a8c4
JJ
1722014-12-17 Jakub Jelinek <jakub@redhat.com>
173
174 PR sanitizer/64289
175 * c-convert.c: Include ubsan.h.
176 (convert): For real -> integral casts and
177 -fsanitize=float-cast-overflow don't call convert_to_integer, but
178 instead instrument the float cast directly.
179
b731b390
JJ
1802014-11-29 Jakub Jelinek <jakub@redhat.com>
181
182 * c-typeck.c (convert_lvalue_to_rvalue, build_atomic_assign,
183 c_finish_stmt_expr): Remove NULL last argument from
184 create_tmp_var_raw and create_tmp_var calls.
185 * c-array-notation.c (fix_builtin_array_notation_fn,
186 build_array_notation_expr, fix_conditional_array_notations_1,
187 fix_array_notation_expr, fix_array_notation_call_expr): Likewise.
188
541e35a6
MP
1892014-11-28 Marek Polacek <polacek@redhat.com>
190
191 PR c/63862
192 * c-typeck.c (build_binary_op) <RSHIFT_EXPR, LSHIFT_EXPR>: Don't
193 convert the right operand to integer type.
194
b286be94
MP
1952014-11-25 Marek Polacek <polacek@redhat.com>
196
197 PR c/63877
198 * c-decl.c (start_function): Disable -Wmissing-declarations warning
199 for inline functions.
200
aa7da51a
JJ
2012014-11-21 Jakub Jelinek <jakub@redhat.com>
202
203 PR target/63764
204 * c-typeck.c (build_array_ref): Adjust
205 convert_vector_to_pointer_for_subscript caller. If it returns true,
206 call non_lvalue_loc on the result.
207
d876207f
RB
2082014-11-11 Richard Biener <rguenther@suse.de>
209
210 * c-decl.c (c_init_decl_processing): Do not set pedantic_lvalues
211 to true.
212
e5e44252
AK
2132014-11-10 Andi Kleen <ak@linux.intel.com>
214
215 PR c/60804
216 * c-parser.c (c_parser_statement_after_labels): Call
217 check_no_cilk.
218 (c_parser_if_statement): Dito.
219 (c_parser_switch_statement): Dito.
220 (c_parser_while_statement): Dito.
221 (c_parser_do_statement): Dito.
222 (c_parser_for_statement): Dito.
223 * c-typeck.c (c_finish_loop): Dito.
224
13c21655
PC
2252014-11-10 Paolo Carlini <paolo.carlini@oracle.com>
226
227 * c-typeck.c (build_binary_op): Use OPT_Wshift_count_negative and
228 OPT_Wshift_count_overflow in the warnings.
229
2d51fcef
MP
2302014-10-30 Marek Polacek <polacek@redhat.com>
231
232 * c-objc-common.c (c_tree_printer) <case 'T'>: For a typedef name,
233 print the stripped version as well, if they're not the same.
234
ef4bddc2
RS
2352014-10-29 Richard Sandiford <richard.sandiford@arm.com>
236
237 * c-decl.c, c-tree.h, c-typeck.c: Remove redundant enum from
238 machine_mode.
239
c582198b
AM
2402014-10-28 Andrew MacLeod <amacleod@redhat.com>
241
242 * c-decl.c: Adjust include files.
243 * c-parser.c: Ditto.
244
ddc8de03
PM
2452014-10-27 Phil Muldoon <pmuldoon@redhat.com>
246 Tom Tromey <tromey@redhat.com>
247
248 * c-tree.h (enum c_oracle_request): New.
249 (c_binding_oracle_function): New typedef.
250 (c_binding_oracle, c_pushtag, c_bind): Declare.
251 * c-decl.c (c_binding_oracle): New global.
252 (I_SYMBOL_CHECKED): New macro.
253 (i_symbol_binding): New function.
254 (I_SYMBOL_BINDING, I_SYMBOL_DECL): Redefine.
255 (I_TAG_CHECKED): New macro.
256 (i_tag_binding): New function.
257 (I_TAG_BINDING, I_TAG_DECL): Redefine.
258 (I_LABEL_CHECKED): New macro.
259 (i_label_binding): New function.
260 (I_LABEL_BINDING, I_LABEL_DECL): Redefine.
261 (c_print_identifier): Save and restore c_binding_oracle.
262 (c_pushtag, c_bind): New functions.
263
60393bbc
AM
2642014-10-27 Andrew MacLeod <amacleod@redhat.com>
265
266 * c-typeck.c: Adjust include files.
267
d723bb7c
MLI
2682014-10-26 Manuel López-Ibáñez <manu@gcc.gnu.org>
269
270 PR c++/53061
271 * c-objc-common.c (c_objc_common_init): Do not do diagnostics
272 initialization here...
273 (c_initialize_diagnostics): ... but here. Set defaults after
274 building pretty-printer.
275
1bc5a451
MP
2762014-10-23 Marek Polacek <polacek@redhat.com>
277
278 PR c/63626
279 * c-decl.c (pop_scope): Don't print warning in external_scope.
280
4435bb92
MP
2812014-10-19 Marek Polacek <polacek@redhat.com>
282
283 PR c/63567
284 * c-typeck.c (output_init_element): Allow initializing objects with
285 static storage duration with compound literals even in C99 and add
286 pedwarn for it.
287
7278465e
MP
2882014-10-17 Marek Polacek <polacek@redhat.com>
289
290 PR c/63567
291 * c-typeck.c (digest_init): Allow initializing objects with static
292 storage duration with compound literals even in C99 and add pedwarn
293 for it.
294
d9b7be2e
MP
2952014-10-17 Marek Polacek <polacek@redhat.com>
296
297 PR c/63543
298 * c-tree.h (C_TYPE_ERROR_REPORTED): Define.
299 * c-typeck.c (build_indirect_ref): Don't print the "dereferencing..."
300 error multiple times. Print the type.
301
f406ae1f
MP
3022014-10-17 Marek Polacek <polacek@redhat.com>
303
304 PR c/63549
305 * c-typeck.c (build_array_ref): Bail if the index in an incomplete
306 type.
307
92574c7c
MP
3082014-10-17 Marek Polacek <polacek@redhat.com>
309
310 * c-decl.c (grokdeclarator): Use OPT_Wimplicit_int unconditionally.
311 (start_function): Use OPT_Wimplicit_int instead of 0.
312 (store_parm_decls_oldstyle): Likewise.
313
1bc4a978
MT
3142014-10-17 Alan Modra <amodra@gmail.com>
315
316 PR middle-end/61848
317 * c-decl.c (merge_decls): Don't merge section name or tls model
318 to newdecl symtab node, instead merge to olddecl. Override
319 existing olddecl section name. Set tls_model for all thread-local
320 vars, not just OMP thread-private ones. Remove incorrect comment.
321
83685514
AM
3222014-10-16 Andrew MacLeod <amacleod@redhat.com>
323
324 * c-decl.c: Adjust include files.
325
78a7c317
DD
3262014-10-14 DJ Delorie <dj@redhat.com>
327
328 * c-parser.c (c_parse_init): Add RID entries for each __intN.
329 (c_token_starts_typename): Check all __intN, not just __int128.
330 (c_token_starts_declspecs): Likewise.
331 (c_parser_declspecs): Likewise.
332 (c_parser_attribute_any_word): Likewise.
333 (c_parser_objc_selector): Likewise.
334 * c-tree.h (c_typespec_keyword): cts_int128 -> cts_int_n.
335 (struct c_declspecs): Add int_n_idx field to record *which* __intN
336 is specified.
337 * c-decl.c (declspecs_add_type): Check for all __intN, not just
338 __int128.
339 (finish_declspecs): Likewise.
340
74d98c1e
AB
3412014-10-13 Anthony Brandon <anthony.brandon@gmail.com>
342
343 * c-parser.c (c_parser_all_labels): New function to replace
344 the duplicate code.
345 (c_parser_statement): Call the new function.
346
84937de2
MP
3472014-10-09 Marek Polacek <polacek@redhat.com>
348
349 PR c/63480
350 * c-typeck.c (pop_init_level): Don't warn about initializing
351 with { }.
352
0382aaa0
MP
3532014-10-07 Marek Polacek <polacek@redhat.com>
354
355 PR c/59717
356 * c-decl.c (header_for_builtin_fn): New function.
357 (implicitly_declare): Suggest which header to include.
358
7a0ca710
MP
3592014-10-07 Marek Polacek <polacek@redhat.com>
360
361 * c-convert.c (convert): Use error_operand_p.
362 * c-typeck.c (require_complete_type): Likewise.
363 (really_atomic_lvalue): Likewise.
364 (digest_init): Likewise.
365 (handle_omp_array_sections_1): Likewise.
366
6bc8a126
MP
3672014-10-03 Marek Polacek <polacek@redhat.com>
368
369 PR c/63453
370 * c-decl.c (pop_scope): Don't warn about "inline function declared
371 but never defined" for functions marked with gnu_inline attribute.
372
d90c0a59
JJ
3732014-09-25 Jakub Jelinek <jakub@redhat.com>
374
375 PR c++/63249
376 * c-parser.c (c_parser_omp_variable_list): Call mark_exp_read
377 on low_bound and length.
378
083e891e
MP
3792014-09-24 Marek Polacek <polacek@redhat.com>
380
381 PR c/61405
382 PR c/53874
383 * c-parser.c: Don't define CPP_KEYWORD.
384 (c_parser_switch_statement): Pass original type to c_finish_case.
385 * c-tree.h (c_finish_case): Update declaration.
386 * c-typeck.c (c_finish_case): Add TYPE parameter. Pass it
387 conditionally to c_do_switch_warnings.
388
8d95fe25
MP
3892014-09-03 Marek Polacek <polacek@redhat.com>
390
391 PR c/62024
392 * c-parser.c (c_parser_static_assert_declaration_no_semi): Strip no-op
393 conversions.
394
9a771876
JJ
3952014-09-02 Jakub Jelinek <jakub@redhat.com>
396 Balaji V. Iyer <balaji.v.iyer@intel.com>
397 Igor Zamyatin <igor.zamyatin@intel.com>
398
399 * c-parser.c (c_parser_cilk_for): New function.
400 (c_parser_cilk_grainsize): Likewise.
401 (c_get_temp_regvar): Likewise.
402 (c_parser_statement_after_labels): Added RID_CILK_FOR case.
403 (c_parser_pragma): Added PRAGMA_CILK_GRAINSIZE case.
404 (c_parser_omp_for_loop): Added CILK_FOR and CILK_SIMD checks.
405 * c-typeck.c (c_finish_omp_clauses): Added OMP_CLAUSE__CILK_FOR_COUNT_
406 case.
407
b7679d96
CG
4082014-08-27 Chen Gang <gang.chen.5i5j@gmail.com>
409
410 * c-aux-info.c (gen_type): Resize 'buff' from 10 to 23 bytes,
411 with using HOST_WIDE_INT without truncation to 'int'
412
59ea0364
MP
4132014-08-22 Marek Polacek <polacek@redhat.com>
414
415 PR c++/62199
416 * c-typeck.c (parser_build_binary_op): Adjust call to
417 warn_logical_not_parentheses.
418
671a475e
IZ
4192014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
420
421 PR other/62008
422 * c-parser.c (c_parser_array_notation): Check for correct
423 type of an array added.
424
04159acf
MP
4252014-08-19 Marek Polacek <polacek@redhat.com>
426
427 PR c++/62153
428 * c-typeck.c (build_binary_op): If either operand of a comparison
429 is a boolean expression, call maybe_warn_bool_compare.
430
c77935ee
PP
4312014-08-19 Patrick Palka <ppalka@gcc.gnu.org>
432
433 PR c/45584
434 * c-typeck.c (build_c_cast): Do a conversion even when the
435 TYPE_MAIN_VARIANTs are the same.
436
35aff4fb
MP
4372014-08-19 Marek Polacek <polacek@redhat.com>
438
439 * c-decl.c (diagnose_mismatched_decls): Unconditionally call
440 pedwarn_c99 instead of pedwarn.
441 (grokfield): Likewise.
442 (warn_defaults_to): New function.
443 (grokdeclarator): Call warn_defaults_to instead of pedwarn_c99.
444 Unconditionally call pedwarn_c99 instead of pedwarn.
445 (start_function): Call warn_defaults_to instead of pedwarn_c99.
446 (declspecs_add_scspec): Call pedwarn_c99 instead of pedwarn, don't
447 check flag_isoc11 before.
448 * c-errors.c (pedwarn_c99): Change the return type to bool.
449 Handle -Wc99-c11-compat.
450 * c-parser.c (disable_extension_diagnostics): Handle
451 warn_c99_c11_compat.
452 (restore_extension_diagnostics): Likewise.
453 (c_parser_static_assert_declaration_no_semi): Call pedwarn_c99
454 instead of pedwarn, don't check flag_isoc11 before.
455 (c_parser_declspecs): Likewise.
456 (c_parser_alignas_specifier): Likewise.
457 (c_parser_alignof_expression): Likewise.
458 (c_parser_generic_selection): Likewise.
459 * c-tree.h (pedwarn_c99): Update declaration.
460 * c-typeck.c (c_finish_return): Call pedwarn or warning_at instead
461 of pedwarn_c99.
462
177cce46
MP
4632014-08-19 Marek Polacek <polacek@redhat.com>
464
465 * c-decl.c (warn_variable_length_array): Pass OPT_Wvla unconditionally
466 to pedwarn_c90.
467 * c-errors.c: Include "opts.h".
468 (pedwarn_c90): Rewrite to handle -Wno-c90-c99-compat better.
469 * c-parser.c (disable_extension_diagnostics): Handle negative value
470 of warn_c90_c99_compat, too.
471 (restore_extension_diagnostics): Likewise.
472 (c_parser_compound_statement_nostart): Pass
473 OPT_Wdeclaration_after_statement unconditionally to pedwarn_c90.
474
6dc99c33
MP
4752014-08-12 Marek Polacek <polacek@redhat.com>
476
477 * c-parser.c (c_parser_postfix_expression) <case RID_FUNCTION_NAME>:
478 Add pedwarn.
479 (c_parser_postfix_expression) <case RID_PRETTY_FUNCTION_NAME>:
480 Likewise.
481 (c_parser_postfix_expression) <case RID_C99_FUNCTION_NAME>: Likewise.
482
f3bede71
MP
4832014-08-10 Marek Polacek <polacek@redhat.com>
484
485 PR c/51849
486 * c-decl.c (build_array_declarator): Remove check for !flag_isoc99.
487 Call pedwarn_c90 instead of pedwarn.
488 (check_bitfield_type_and_width): Likewise.
489 (declspecs_add_qual): Likewise.
490 (declspecs_add_type): Likewise.
491 (warn_variable_length_array): Unify function for -pedantic and -Wvla.
492 Adjust to only call pedwarn_c90.
493 (grokdeclarator): Remove pedantic && !flag_isoc99 check. Call
494 pedwarn_c90 instead of pedwarn.
495 * c-errors.c (pedwarn_c90): Handle -Wc90-c99-compat.
496 * c-parser.c (disable_extension_diagnostics): Handle
497 warn_c90_c99_compat.
498 (restore_extension_diagnostics): Likewise.
499 (c_parser_enum_specifier): Remove check for !flag_isoc99. Call
500 pedwarn_c90 instead of pedwarn.
501 (c_parser_initelt): Likewise.
502 (c_parser_postfix_expression): Likewise.
503 (c_parser_postfix_expression_after_paren_type): Likewise.
504 (c_parser_compound_statement_nostart): Remove check for !flag_isoc99.
505 * c-tree.h: Fix formatting.
506 * c-typeck.c (build_array_ref): Remove check for !flag_isoc99. Call
507 pedwarn_c90 instead of pedwarn.
508
9f25a338
TS
5092014-08-07 Trevor Saunders <tsaunders@mozilla.com>
510
511 * c-typeck.c: Remove include of pointer-set.h.
512
044331a8
MP
5132014-08-07 Marek Polacek <polacek@redhat.com>
514
515 * c-typeck.c (pointer_diff): Remove P - (P + CST) optimization.
516
b787e7a2
TS
5172014-08-02 Trevor Saunders <tsaunders@mozilla.com>
518
519 * c-typeck.c: Use hash_map instead of pointer_map.
520
6e2830c3
TS
5212014-08-02 Trevor Saunders <tsaunders@mozilla.com>
522
523 * c-decl.c: Use hash_set instead of pointer_set.
524
a7ee52fb
IZ
5252014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
526
527 PR middle-end/61455
528 * c-array-notation.c (expand_array_notations): Handling
529 of DECL_EXPR added.
530
b4dfdc11
MG
5312014-07-31 Marc Glisse <marc.glisse@inria.fr>
532
533 PR c++/60517
534 * c-typeck.c (c_finish_return): Return 0 instead of the address of
535 a local variable.
536
976d5a22
TT
5372014-07-30 Tom Tromey <tromey@redhat.com>
538
539 * c-typeck.c (struct constructor_stack) <designator_depth>: New
540 field.
541 (really_start_incremental_init, push_init_level): Initialize
542 designator_depth.
543 (pop_init_level): Set global designator_depth.
544 (process_init_element): Check for designated_init attribute.
545
30281de2
MP
5462014-07-20 Marek Polacek <polacek@redhat.com>
547
548 PR c/61852
549 * c-decl.c (implicit_decl_warning): Add location_t parameter. Use it.
550 (implicitly_declare): Pass location to implicit_decl_warning.
551
b108f48f
JJ
5522014-07-14 Jakub Jelinek <jakub@redhat.com>
553
554 PR middle-end/61294
555 * c-parser.c (c_parser_expr_list): Add new argument literal_zero_mask.
556 If non-NULL, call c_parser_check_literal_zero.
557 (c_parser_check_literal_zero): New function.
558 (c_parser_postfix_expression_after_primary): Adjust
559 c_parser_expr_list caller, handle -Wmemset-transposed-args.
560
773ec47f
MP
5612014-07-06 Marek Polacek <polacek@redhat.com>
562
563 PR c/6940
564 * c-decl.c (grokdeclarator): Set C_ARRAY_PARAMETER.
565 * c-tree.h (C_ARRAY_PARAMETER): Define.
566 * c-typeck.c (c_expr_sizeof_expr): Warn when using sizeof on an array
567 function parameter.
568
22e1cf1c
JH
5692014-07-02 Jan Hubicka <hubicka@ucw.cz>
570 Chen Gang <gang.chen.5i5j@gmail.com>
571
572 * c-decl.c (duplicate_decls): CLear DECL_STRUCT_FUNCTION before
573 releasing symbol.
574
52ec0ea3
MP
5752014-07-01 Marek Polacek <polacek@redhat.com>
576
577 * c-typeck.c (convert_for_assignment): Pass OPT_Wint_conversion
578 instead of 0 to WARN_FOR_ASSIGNMENT.
579
d5c3d343
MP
5802014-07-01 Marek Polacek <polacek@redhat.com>
581
582 PR c/58286
583 * c-typeck.c (convert_for_assignment): Pass
584 OPT_Wincompatible_pointer_types instead of 0 to WARN_FOR_ASSIGNMENT.
585
6a7253a4
MP
5862014-06-30 Marek Polacek <polacek@redhat.com>
587
588 * c-decl.c (grokdeclarator): Don't instrument VLAs if the function
589 has no_sanitize_undefined attribute.
590
5e88a8f4
IZ
5912014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
592
593 PR middle-end/57541
594 * c-array-notation.c (fix_builtin_array_notation_fn):
595 Check for 0 arguments in builtin call. Check that bultin argument is
596 correct.
597 * c-parser.c (c_parser_array_notation): Check for incorrect initial
598 index.
599
9698b078
SH
6002014-06-27 Sebastian Huber <sebastian.huber@embedded-brains.de>
601
602 * c-parser.c (c_parser_declaration_or_fndef): Discard all type
603 qualifiers in __auto_type for atomic types.
604 (c_parser_typeof_specifier): Discard all type qualifiers in
605 __typeof__ for atomic types.
606
6e07c515
MP
6072014-06-25 Marek Polacek <polacek@redhat.com>
608
609 PR c/61162
610 * c-parser.c (c_parser_statement_after_labels): Pass the location of
611 the return expression to c_finish_return.
612
da6f124d
JJ
6132014-06-25 Jakub Jelinek <jakub@redhat.com>
614
615 * c-typeck.c (c_finish_omp_clauses): Make sure
616 OMP_CLAUSE_LINEAR_STEP has correct type.
617
c203e8a7
TS
6182014-06-24 Trevor Saunders <tsaunders@mozilla.com>
619
620 * c-decl.c: Adjust.
621
56ad0e38
JJ
6222014-06-24 Jakub Jelinek <jakub@redhat.com>
623
624 * c-parser.c (c_parser_omp_for_loop): For
625 #pragma omp parallel for simd move lastprivate clause from parallel
626 to for rather than simd.
627
47c2554f
MP
6282014-06-23 Marek Polacek <polacek@redhat.com>
629
630 * c-typeck.c (parser_build_binary_op): Don't call
631 warn_logical_not_parentheses if the RHS is TRUTH_NOT_EXPR.
632
56363ffd
JH
6332014-06-15 Jan Hubicka <hubicka@ucw.cz>
634
635 * c-parser.c (c_parser_omp_threadprivate): Likewise.
636 * c-decl.c (merge_decls): Likewise.
637
d7ff7ae5
MP
6382014-06-09 Marek Polacek <polacek@redhat.com>
639
640 PR c/36446
641 * c-typeck.c (error_init): Call inform instead of error_at.
642 (pedwarn_init): Call inform instead of pedwarn.
643 (warning_init): Call inform instead of warning_at.
644
24d047a3
JH
6452014-06-07 Jan Hubicka <hubicka@ucw.cz>
646
647 * c-decl.c (merge_decls): Use set_decl_section_name.
648 (duplicate_decls): Remove node if it exists.
649
9bac5cbb
G
6502014-06-05 S. Gilles <sgilles@terpmail.umd.edu>
651
652 PR c/53119
653 * c-typeck.c (push_init_level, process_init_element,
654 pop_init_level): Correct check for zero initialization, move
655 missing brace warning to respect zero initialization.
656
8ffcdea8
MP
6572014-06-05 Marek Polacek <polacek@redhat.com>
658
659 PR c/56724
660 * c-typeck.c (convert_for_assignment): Use expr_loc for ic_argpass.
661
742938c9
MP
6622014-06-05 Marek Polacek <polacek@redhat.com>
663
664 PR c/49706
665 * c-typeck.c (parser_build_binary_op): Warn when logical not is used
666 on the left hand side operand of a comparison.
667
6447c55d
MP
6682014-06-05 Marek Polacek <polacek@redhat.com>
669
670 PR c/48062
671 * c-decl.c (warn_if_shadowing): Call inform instead of warning_at.
672 Print note only if the warning was printed.
673
9dc7743c
IZ
6742014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
675
676 PR c/58942
677 * c-array-notation.c (fix_builtin_array_notation_fn): Handle the case
678 with a pointer.
679
fedfecef
MP
6802014-06-03 Marek Polacek <polacek@redhat.com>
681
682 PR c/60439
683 * c-parser.c (c_parser_switch_statement): Pass explicit_cast_p to
684 c_start_case.
685 * c-tree.h (c_start_case): Update.
686 * c-typeck.c (c_start_case): Add new boolean parameter. Warn if
687 switch condition has boolean value.
688
9b2b7279
AM
6892014-06-02 Andrew MacLeod <amacleod@redhat.com>
690
691 * c-decl.c: Include builtins.h.
692 * c-parser.c: Likewise.
693
5c1bc275
MP
6942014-05-27 Marek Polacek <polacek@redhat.com>
695
696 PR c/56724
697 * c-typeck.c (convert_arguments): Get location of a parameter. Change
698 error and warning calls to error_at and warning_at. Pass location of
699 a parameter to it. Call warning_at with OPT_Wtraditional_conversion.
700 (convert_for_assignment): Add parameter to WARN_FOR_ASSIGNMENT and
701 WARN_FOR_QUALIFIERS. Pass expr_loc to those.
702
97563bc8
IZ
7032014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
704
705 PR c/61191
706 * c-array-notation.c (fix_builtin_array_notation_fn): Check invalid
707 function parameters.
708
aede2c10
JH
7092014-05-23 Jan Hubicka <hubicka@ucw.cz>
710
711 * c-decl.c (merge_decls): Preserve symtab node pointers.
712 (duplicate_decls): Free new decl.
713
edbba2ce
TS
7142014-05-23 Thomas Schwinge <thomas@codesourcery.com>
715
f3316c6d
TS
716 * c-typeck.c (c_finish_omp_clauses): Remove duplicated variable
717 initialization.
718
edbba2ce
TS
719 * c-parser.c (c_parser_omp_target): Return bool values.
720
68c81f24
TS
7212014-05-22 Thomas Schwinge <thomas@codesourcery.com>
722
723 * c-parser.c (c_parser_omp_clause_thread_limit): Rename
724 num_teams_loc variable to num_thread_limit_loc.
725
632f2871
RS
7262014-05-21 Richard Sandiford <rsandifo@linux.vnet.ibm.com>
727
728 * c-array-notation.c (expand_array_notations): Use void_node
729 instead of void_zero_node.
730
766090c2
TS
7312014-05-17 Trevor Saunders <tsaunders@mozilla.com>
732
733 * c-decl.c (finish_struct): Adjust.
734 (finish_enum): Likewise.
735 (bind): Adjust.
736 (record_inline_static): Likewise.
737 (push_scope): Likewise.
738 (make_label): Likewise.
739 (lookup_label_for_goto): Likewise.
740 (finish_struct): Likewise.
741 (finish_enum): Likewise.
742 (store_parm_decls): Likewise.
743 (c_push_function_context): Likewise.
744 * c-lang.h: Remove usage of variable_size gty attribute.
745 * c-parser.c (c_parse_init): Adjust.
746 (c_parse_file): Likewise.
747
2b107f6b
MP
7482014-05-13 Marek Polacek <polacek@redhat.com>
749
750 PR c/61162
751 * c-typeck.c (convert_for_assignment): Pass location to
752 WARN_FOR_ASSIGNMENT instead of input_location.
753
d033409e
MP
7542014-05-10 Marek Polacek <polacek@redhat.com>
755
756 * c-parser.c (c_parser_declaration_or_fndef): Pass init_loc to
757 maybe_warn_string_init.
758 (c_parser_postfix_expression_after_paren_type): Pass type_loc to
759 maybe_warn_string_init.
760 * c-tree.h (maybe_warn_string_init): Update declaration.
761 * c-typeck.c (maybe_warn_string_init): Add location parameter.
762 Call pedwarn_init with loc instead of with input_location.
763 (digest_init): Pass init_loc to maybe_warn_string_init.
764 (pop_init_level): Call pedwarn_init with loc instead of with
765 input_location.
766 (set_init_index): Likewise.
767 (process_init_element): Likewise.
768
ea58ef42
MP
7692014-05-09 Marek Polacek <polacek@redhat.com>
770
771 PR c/61096
772 * c-parser.c (c_parser_braced_init): Pass brace_loc to push_init_level.
773 (c_parser_initelt): Pass location to set_init_label. Pass array index
774 location to set_init_index.
775 * c-tree.h (push_init_level): Update declaration.
776 (pop_init_level): Likewise.
777 (set_init_index): Likewise.
778 (set_init_label): Likewise.
779 * c-typeck.c (error_init): Add location parameter. Call error_at
780 instead of error.
781 (digest_init): Pass init_loc to error_init.
782 (really_start_incremental_init):
783 (push_init_level): Add location parameter. Pass loc to pop_init_level
784 and error_init.
785 (pop_init_level): Likewise.
786 (set_designator): Add location parameter. Pass loc to pop_init_level,
787 push_init_level, and error_init.
788 (set_init_index): Add location parameter. Pass loc to error_init and
789 set_designator.
790 (set_init_label): Likewise.
791 (output_init_element): Pass loc to error_init.
792 (process_init_element): Pass loc to error_init, pop_init_level,
793 pedwarn_init, and push_init_level.
794
661a0813
MP
7952014-05-09 Marek Polacek <polacek@redhat.com>
796
797 PR c/50459
798 * c-parser.c (c_parser_attributes): Parse the arguments as an
799 expression-list if the attribute takes identifier.
800
2793eeab
MP
8012014-05-08 Marek Polacek <polacek@redhat.com>
802
803 PR c/61053
804 * c-decl.c (grokdeclarator): Use min_align_of_type instead of
805 TYPE_ALIGN_UNIT.
806
f827930a
MP
8072014-05-08 Marek Polacek <polacek@redhat.com>
808
809 PR c/61077
810 * c-decl.c (start_function): Warn for _Atomic-qualified return type
811 of main.
812
1d60af08
KZ
8132014-05-06 Kenneth Zadeck <zadeck@naturalbridge.com>
814 Mike Stump <mikestump@comcast.net>
815 Richard Sandiford <rdsandiford@googlemail.com>
816
817 * c-decl.c (check_bitfield_type_and_width): Use TYPE_SIGN.
818 (finish_enum): Use wide-int interfaces.
819 * c-parser.c (c_parser_cilk_clause_vectorlength): Likewise.
820 * c-typeck.c (build_c_cast): Likewise.
821 (set_nonincremental_init_from_string): Likewise.
822 (c_tree_equal): Likewise.
823
a0e24419
MP
8242014-05-02 Marek Polacek <polacek@redhat.com>
825
826 PR c/25801
827 * c-typeck.c (c_size_in_bytes): Update comment. Don't call error.
828 Return size_one_node when the type is not complete.
829 (pointer_diff): Remove comment.
830 (build_unary_op): Improve error messages.
831
19fc9faa
MP
8322014-05-02 Marek Polacek <polacek@redhat.com>
833
834 * c-typeck.c (c_finish_return): Separate warning_at calls.
835
63bc4e87
MP
8362014-05-02 Marek Polacek <polacek@redhat.com>
837
838 * c-tree.h (error_init): Remove declaration.
839 (pedwarn_init): Likewise.
840 * c-typeck.c (error_init): Make static and move above.
841 (pedwarn_init): Likewise.
842 (warning_init): Move above.
843 (maybe_warn_string_init): Likewise.
844
4bd2511b
JL
8452014-05-01 Jeff Law <law@redhat.com>
846
847 Revert:
848
849 2014-04-24 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
850 * c-parser.c (c_parser_sizeof_expression): Reorganize slightly to
851 avoid goto.
852
6a358dcb
MP
8532014-05-02 Marek Polacek <polacek@redhat.com>
854
855 PR c/60784
856 * c-typeck.c (push_init_level): Set constructor_designated to
857 p->designated for structures.
858
ae5ebda4
MP
8592014-05-01 Marek Polacek <polacek@redhat.com>
860
861 PR c/60915
862 * c-parser.c (c_parser_declaration_or_fndef): Give better error if
863 function-definition has an attribute after the declarator.
864
96b40f8d
MP
8652014-05-01 Marek Polacek <polacek@redhat.com>
866
867 PR c/60257
868 * c-typeck.c (warning_init): Add location_t parameter. Call
869 warning_at instead of warning.
870 (push_init_level): Pass input_location to warning_init.
871 (add_pending_init): Add location_t parameter. Pass loc to
872 warning_init.
873 (set_nonincremental_init): Pass input_location to add_pending_init.
874 (set_nonincremental_init_from_string): Likewise.
875 (output_init_element): Pass loc to warning_init and to
876 add_pending_init.
877
32e00768
MP
8782014-05-01 Marek Polacek <polacek@redhat.com>
879
880 PR c/43395
881 * c-typeck.c (c_finish_return): Distinguish between label and variable
882 when warning about returning local address.
883
c9379ce2
MP
8842014-05-01 Marek Polacek <polacek@redhat.com>
885
886 PR c/29467
887 * c-decl.c (declspecs_add_type): Pedwarn if boolean types are used
888 in C89 mode.
889
d00887e8
MP
8902014-05-01 Marek Polacek <polacek@redhat.com>
891
892 PR c/43245
893 * c-typeck.c (convert_for_assignment): Pass OPT_Wdiscarded_qualifiers
894 instead of 0 to WARN_FOR_QUALIFIERS.
895
5436fa2e
MP
8962014-05-01 Marek Polacek <polacek@redhat.com>
897
898 PR c/56989
899 * c-typeck.c (default_conversion): Use better location for
900 error call.
901
f8ed5150
MP
9022014-04-30 Marek Polacek <polacek@redhat.com>
903
904 * c-typeck.c (build_binary_op): Call ubsan_instrument_division
905 also when SANITIZE_FLOAT_DIVIDE is on.
906
8337d1db
MP
9072014-04-30 Marek Polacek <polacek@redhat.com>
908
909 PR c/60139
910 * c-typeck.c (output_init_element): Pass OPT_Wpedantic to pedwarn
911 and pedwarn_init. Use loc insted of input_location.
912
c4bdc42f
MP
9132014-04-30 Marek Polacek <polacek@redhat.com>
914
915 PR c/60351
916 * c-typeck.c (build_binary_op): Use location when warning about
917 shift count.
918
45484dcf
MP
9192014-04-25 Marek Polacek <polacek@redhat.com>
920
921 PR c/18079
922 * c-decl.c (diagnose_mismatched_decls): Warn for mismatched
923 always_inline/noinline and hot/cold attributes.
924
34cf811f
MP
9252014-04-25 Marek Polacek <polacek@redhat.com>
926
927 PR c/60114
928 * c-parser.c (c_parser_initelt): Pass input_location to
929 process_init_element.
930 (c_parser_initval): Pass loc to process_init_element.
931 * c-tree.h (process_init_element): Adjust declaration.
932 * c-typeck.c (push_init_level): Pass input_location to
933 process_init_element.
934 (pop_init_level): Likewise.
935 (set_designator): Likewise.
936 (output_init_element): Add location_t parameter. Pass loc to
937 digest_init.
938 (output_pending_init_elements): Pass input_location to
939 output_init_element.
940 (process_init_element): Add location_t parameter. Pass loc to
941 output_init_element.
942
42056eac
JJ
9432014-04-24 Jakub Jelinek <jakub@redhat.com>
944
945 * c-parser.c (c_parser_omp_atomic): Allow seq_cst before
946 atomic-clause, allow comma in between atomic-clause and
947 seq_cst.
948
e162a134
JJ
9492014-04-22 Jakub Jelinek <jakub@redhat.com>
950
951 PR c/59073
952 * c-parser.c (c_parser_omp_parallel): If c_parser_omp_for
953 fails, don't set OM_PARALLEL_COMBINED and return NULL.
954
2f6babac
IZ
9552014-04-12 Igor Zamyatin <igor.zamyatin@intel.com>
956
957 PR middle-end/60469
958 * c-array-notation.c (fix_builtin_array_notation_fn): Use
959 create_tmp_var instead build_decl for creating temps.
960 (build_array_notation_expr): Likewise.
961 (fix_conditional_array_notations_1): Likewise.
962 (fix_array_notation_expr): Likewise.
963 (fix_array_notation_call_expr): Likewise.
964
8edbfaa6
JJ
9652014-03-28 Jakub Jelinek <jakub@redhat.com>
966
967 PR c++/60689
968 * c-tree.h (c_build_function_call_vec): New prototype.
969 * c-typeck.c (build_function_call_vec): Don't call
970 resolve_overloaded_builtin here.
971 (c_build_function_call_vec): New wrapper function around
972 build_function_call_vec. Call resolve_overloaded_builtin here.
973 (convert_lvalue_to_rvalue, build_function_call, build_atomic_assign):
974 Call c_build_function_call_vec instead of build_function_call_vec.
975 * c-parser.c (c_parser_postfix_expression_after_primary): Likewise.
976 * c-decl.c (finish_decl): Likewise.
977
7485aeea
MLI
9782014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
979
980 PR c/55383
981 * c-typeck.c: Use correct format string in cast-qual warning
982
b17a8b07
TS
9832014-03-07 Thomas Schwinge <thomas@codesourcery.com>
984
985 * c-decl.c (c_decl_attributes): Use
986 lang_hooks.types.omp_mappable_type.
987 * c-typeck.c (c_finish_omp_clauses): Likewise.
988
3af9c5e9
MP
9892014-03-06 Marek Polacek <polacek@redhat.com>
990
991 PR c/60197
992 * c-typeck.c (c_finish_return): Call contains_cilk_spawn_stmt instead
993 of checking tree code.
994
1c9f5f33
PK
9952014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
996
997 * c-parser.c (c_parser_declspecs): Replace call to error by error_at.
998 (c_parser_parameter_declaration): Likewise.
999
cc28fc7f
MP
10002014-02-19 Marek Polacek <polacek@redhat.com>
1001
1002 PR c/60195
1003 * c-typeck.c (convert_lvalue_to_rvalue): Set TREE_NO_WARNING on tmp.
1004 Call mark_exp_read on exp.value.
1005 (build_atomic_assign): Set TREE_NO_WARNING on val and old. Set
1006 TREE_ADDRESSABLE on old instead of val.
1007 (emit_side_effect_warnings): Warn only if RHS has !TREE_NO_WARNING.
1008
b581c05c
PK
10092014-02-07 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
1010
1011 * c-parser.c (c_parser_get_builtin_args): Replace calls to
1012 C_EXPR_APPEND by vec_safe_push.
1013 * c-tree.h (C_EXPR_APPEND): Remove.
1014
81e5eca8
MP
10152014-01-31 Marek Polacek <polacek@redhat.com>
1016
1017 PR c/59963
1018 * c-typeck.c (convert_lvalue_to_rvalue): Pass vNULL to
1019 build_function_call_vec.
1020 (build_function_call): Likewise.
1021 (build_atomic_assign): Likewise.
1022 (build_function_call_vec): Add arg_loc parameter. Use it.
1023 (convert_arguments): Likewise.
1024 (convert_for_assignment): Rename rhs_loc to expr_loc.
1025 * c-parser.c (c_parser_attributes): Pass NULL to c_parser_expr_list.
1026 (c_parser_objc_keywordexpr): Likewise.
1027 (c_parser_postfix_expression_after_primary): Call
1028 build_function_call_vec with expr_loc rather than op_loc.
1029 Call c_parser_expr_list to fill arg_loc. Pass arg_loc to
1030 build_function_call_vec.
1031 (c_parser_expr_list): Add locations parameter. Fill it with locations
1032 of function arguments.
1033 * c-decl.c (finish_decl): Pass vNULL to build_function_call_vec.
1034
68fca595
MP
10352014-01-30 Marek Polacek <polacek@redhat.com>
1036
1037 PR c/59940
1038 * c-typeck.c (build_function_call_vec): Use loc parameter.
1039 (convert_arguments): Add location parameter. Use it.
1040 (ep_convert_and_check): Likewise.
1041 (build_atomic_assign): Adjust convert_for_assignment call.
1042 (build_modify_expr): Likewise.
1043 (digest_init): Likewise.
1044 (c_finish_return): Likewise.
1045 (build_conditional_expr): Adjust ep_convert_and_check calls.
1046 (convert_for_assignment): Add rhs_loc parameter. Use it.
1047 (build_binary_op): Adjust convert_and_check and ep_convert_and_check
1048 calls.
1049
fa337f3a
RB
10502014-01-30 Richard Biener <rguenther@suse.de>
1051
1052 PR c/59905
1053 * c-typeck.c (build_function_call_vec): Do not replace calls
1054 to a function via an incompatible type with a runtime abort.
1055
b72271b9
BI
10562014-01-24 Balaji V. Iyer <balaji.v.iyer@intel.com>
1057
1058 * c-parser.c (c_parser_declaration_or_fndef): Replaced
1059 flag_enable_cilkplus with flag_cilkplus.
1060 (c_parser_direct_declarator_inner): Likewise.
1061 (c_parser_attribute_any_word): Likewise.
1062 (c_parser_attributes): Likewise.
1063 (c_parser_compound_statement): Likewise.
1064 (c_parser_statement_after_labels): Likewise.
1065 (c_parser_if_statement): Likewise.
1066 (c_parser_switch_statement): Likewise.
1067 (c_parser_do_statement): Likewise.
1068 (c_parser_for_statement): Likewise.
1069 (c_parser_unary_expression): Likewise.
1070 (c_parser_postfix_expression): Likewise.
1071 (c_parser_postfix_expression_after_primary): Likewise.
1072 (c_parser_postfix_expression_after_primary): Likewise.
1073 (c_parser_omp_clause_name): Likewise.
1074 (c_finish_omp_declare_simd): Likewise.
1075 (c_parser_cilk_verify_simd): Likewise.
1076 * c-typeck.c (build_array_ref): Likewise.
1077 (build_function_call_vec): Likewise.
1078 (convert_arguments): Likewise.
1079 (build_compound_expr): Likewise.
1080 (c_finish_return): Likewise.
1081 (c_finish_if_stmt): Likewise.
1082 (c_finish_loop): Likewise.
1083 (build_binary_op): Likewise.
1084
393e8e8b
MP
10852014-01-23 Marek Polacek <polacek@redhat.com>
1086
1087 PR c/59846
1088 * c-typeck.c (parser_build_binary_op): Use location instead of
1089 input_location.
1090 (build_binary_op): Pass location to shorten_compare.
1091
f04dda30
MP
10922014-01-23 Marek Polacek <polacek@redhat.com>
1093
1094 PR c/58346
1095 * c-typeck.c (pointer_diff): Give an error on arithmetic on pointer to
1096 an empty aggregate.
1097
789eadcd
MP
10982014-01-23 Marek Polacek <polacek@redhat.com>
1099
1100 PR c/59871
1101 * c-typeck.c (build_compound_expr): Warn even for right-hand operand
1102 of a comma expression.
1103 (emit_side_effect_warnings): Likewise.
1104
40f14e9f
BI
11052014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1106
1107 PR c/59825
1108 * c-array-notation.c (expand_array_notation_exprs): Rewrote this
1109 function to use walk_tree and moved a lot of its functionality to
1110 expand_array_notations.
1111 (expand_array_notations): New function.
1112
74558dd9
BI
11132014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
1114
1115 * c-parser.c (c_finish_omp_declare_simd): Made "cilk simd function"
1116 attribute an attribute without value.
1117
652fea39
JJ
11182014-01-23 Jakub Jelinek <jakub@redhat.com>
1119
1120 PR middle-end/58809
1121 * c-typeck.c (c_finish_omp_clause): Reject MIN_EXPR, MAX_EXPR,
1122 BIT_AND_EXPR, BIT_IOR_EXPR and BIT_XOR_EXPR on COMPLEX_TYPEs.
1123
f34f1c87
MP
11242014-01-22 Marek Polacek <polacek@redhat.com>
1125
1126 PR c/59891
1127 * c-typeck.c (build_conditional_expr): Call c_fully_fold instead
1128 of remove_c_maybe_const_expr on op1 and op2.
1129
241f845a
JJ
11302014-01-15 Jakub Jelinek <jakub@redhat.com>
1131
1132 PR c/58943
1133 * c-typeck.c (build_modify_expr): For lhs op= rhs, if rhs has side
1134 effects, preevaluate rhs using SAVE_EXPR first.
1135
9a74f20c
BI
11362014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
1137
1138 PR c++/59631
1139 * c-parser.c (c_parser_postfix_expression): Replaced consecutive if
1140 statements with if-elseif statements.
1141
96066ce1
MP
11422014-01-06 Marek Polacek <polacek@redhat.com>
1143
1144 PR c/57773
1145 * c-decl.c (check_bitfield_type_and_width): Warn for implementation
1146 defined bit-field types only in ISO C.
1147
23a5b65a
RS
11482014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1149
1150 Update copyright years
1151
f9030485
RS
11522014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
1153
1154 * c-array-notation.c: Use the standard form for the copyright notice.
1155
41958c28
BI
11562013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
1157
1158 * c-parser.c (struct c_parser::cilk_simd_fn_tokens): Added new field.
1159 (c_parser_declaration_or_fndef): Added a check if cilk_simd_fn_tokens
1160 field in parser is not empty. If not-empty, call the function
1161 c_parser_finish_omp_declare_simd.
1162 (c_parser_cilk_clause_vectorlength): Modified function to be shared
1163 between SIMD-enabled functions and #pragma simd. Added new parameter.
1164 (c_parser_cilk_all_clauses): Modified the usage of the function
1165 c_parser_cilk_clause_vectorlength as mentioned above.
1166 (c_parser_cilk_simd_fn_vector_attrs): New function.
1167 (c_finish_cilk_simd_fn_tokens): Likewise.
1168 (is_cilkplus_vector_p): Likewise.
1169 (c_parser_omp_clause_name): Added checking for "vectorlength,"
1170 "nomask," and "mask" strings in clause name.
1171 (c_parser_omp_all_clauses): Added 3 new case statements:
1172 PRAGMA_CILK_CLAUSE_VECTORLENGTH, PRAGMA_CILK_CLAUSE_MASK and
1173 PRAGMA_CILK_CLAUSE_NOMASK.
1174 (c_parser_attributes): Added a cilk_simd_fn_tokens parameter. Added a
1175 check for vector attribute and if so call the function
1176 c_parser_cilk_simd_fn_vector_attrs. Also, when Cilk plus is enabled,
1177 called the function c_finish_cilk_simd_fn_tokens.
1178 (c_finish_omp_declare_simd): Added a check if cilk_simd_fn_tokens in
1179 parser field is non-empty. If so, parse them as you would parse
1180 the omp declare simd pragma.
1181 (c_parser_omp_clause_linear): Added a new bool parm. is_cilk_simd_fn.
1182 Added a check when step is a parameter and flag it as error.
1183 (CILK_SIMD_FN_CLAUSE_MASK): New #define.
1184 (c_parser_cilk_clause_name): Changed pragma_cilk_clause to
1185 pragma_omp_clause.
1186
cef0fd0e
TS
11872013-12-17 Thomas Schwinge <thomas@codesourcery.com>
1188
1189 * c-parser.c (c_parser_omp_parallel): Fix description.
1190
12893402
BI
11912013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
1192
1193 * c-objc-common.h (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Remove.
1194 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1195 (LANG_HOOKS_CILKPLUS_CILKPLUS_GIMPLIFY_SPAWN): Likewise.
1196 * c-typeck.c (cilk_install_body_with_frame_cleanup): New function.
1197
296674db
JM
11982013-12-04 Joseph Myers <joseph@codesourcery.com>
1199
1200 PR c/52023
1201 * c-parser.c (c_parser_alignas_specifier): Use
1202 c_sizeof_or_alignof_type instead of c_alignof.
1203 (c_parser_alignof_expression): Likewise, with min_alignof
1204 parameter depending on alignof spelling used.
1205
edd28054
MP
12062013-12-04 Marek Polacek <polacek@redhat.com>
1207
1208 PR c/54113
1209 * c-decl.c (start_function): Don't warn for missing prototype for
1210 inline functions.
1211
da0fc454
MP
12122013-12-03 Marek Polacek <polacek@redhat.com>
1213
1214 PR c/59351
1215 * c-decl.c (build_compound_literal): Allow compound literals with
1216 empty initial value.
1217
4c2ecab0
JM
12182013-12-02 Joseph Myers <joseph@codesourcery.com>
1219
1220 PR c/58235
1221 * c-typeck.c (build_modify_expr): Diagnose assignment to
1222 expression with array type.
1223
340baef7
JM
12242013-11-29 Joseph Myers <joseph@codesourcery.com>
1225
1226 PR c/42262
1227 * c-typeck.c (process_init_element): Do not treat a string as
1228 initializing a whole array when used with a designator for an
1229 individual element.
1230
6763b9f7
JM
12312013-11-29 Joseph Myers <joseph@codesourcery.com>
1232
1233 PR c/57574
1234 * c-decl.c (merge_decls): Clear DECL_EXTERNAL for a definition of
1235 an inline function following a static declaration.
1236
e7bd1de1
JJ
12372013-11-28 Jakub Jelinek <jakub@redhat.com>
1238
1239 PR c/59310
1240 * c-parser.c (c_parser_omp_target): Copy "#pragma omp target"
1241 to p_name before calling c_parser_omp_teams instead of after.
1242 (c_parser_cilk_simd): Remove wrong ATTRIBUTE_UNUSED from parser
1243 argument. Remove unused p_name variable.
1244
0136f8f0
AH
12452013-11-27 Aldy Hernandez <aldyh@redhat.com>
1246 Jakub Jelinek <jakub@redhat.com>
1247
1248 * c-decl.c (c_builtin_function_ext_scope): Avoid binding if
1249 external_scope is NULL.
1250
241b71bb
TV
12512013-11-27 Tom de Vries <tom@codesourcery.com>
1252 Marc Glisse <marc.glisse@inria.fr>
1253
1254 PR c++/59032
1255 * c-typeck.c (build_unary_op): Allow vector increment and decrement.
1256
2fb9a547
AM
12572013-11-22 Andrew MacLeod <amacleod@redhat.com>
1258
1259 * c-typeck.c: Add required include files from gimple.h.
1260
8400e75e
DM
12612013-11-22 David Malcolm <dmalcolm@redhat.com>
1262
1263 * c-decl.c (define_label, shadow_tag_warned)
1264 (check_bitfield_type_and_width, grokdeclarator, grokparms,
1265 store_parm_decls_newstyle, store_parm_decls_oldstyle)
1266 (declspecs_add_type): Remove use of in_system_header macro.
1267 * c-parser.c (c_parser_unary_expression): Likewise.
1268 * c-typeck.c (store_init_value, process_init_element)
1269 (c_start_case): Likewise.
1270
1271 * c-decl.c (build_enumerator): Remove use of EXPR_LOC_OR_HERE
1272 macro.
1273
1274 * c-parser.c (c_parser_set_source_position_from_token): Remove
1275 reference to in_system_header from comment.
1276
386b1f1f
RS
12772013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1278
1279 * c-decl.c (grokdeclarator): Update comment to refer to
1280 tree_to_[su]hwi rather than tree_low_cst.
1281
ae7e9ddd
RS
12822013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1283
1284 * c-decl.c, c-typeck.c: Replace tree_low_cst (..., 1) with
1285 tree_to_uhwi throughout.
1286
9439e9a1
RS
12872013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1288
1289 * c-parser.c: Replace tree_low_cst (..., 0) with tree_to_shwi
1290 throughout.
1291
9541ffee
RS
12922013-11-18 Richard Sandiford <rdsandiford@googlemail.com>
1293
1294 * c-parser.c: Replace host_integerp (..., 0) with tree_fits_shwi_p
1295 throughout.
1296
c02065fc
AH
12972013-11-15 Aldy Hernandez <aldyh@redhat.com>
1298
1299 * c-parser.c (c_parser_cilk_simd): New.
1300 (c_parser_cilk_verify_simd): New.
1301 (c_parser_pragma): Add case for PRAGMA_CILK_SIMD.
1302 (c_parser_omp_for_loop): Add case for NE_EXPR.
1303 Set c_break_label for CILK_SIMD.
1304 (c_parser_cilk_clause_vectorlength): New.
1305 (c_parser_cilk_clause_linear): New.
1306 (c_parser_cilk_clause_name): New.
1307 (c_parser_cilk_all_clauses): New.
1308 * c-typeck.c (build_unary_op): Pass location argument to
1309 readonly_error.
1310 (build_modify_expr): Same.
1311 (build_asm_expr): Same.
1312 (c_finish_bc_stmt): Error on break/continue in loops.
1313
18f429e2
AM
13142013-11-14 Andrew MacLeod <amacleod@redhat.com>
1315
1316 * c-typeck.c: Include only gimplify.h and gimple.h as needed.
1317
d8a2d370
DN
13182013-11-14 Diego Novillo <dnovillo@google.com>
1319
1320 * c-decl.c: Include print-tree.h.
1321 Include stor-layout.h.
1322 Include varasm.h.
1323 Include attribs.h.
1324 Include stringpool.h.
1325 * c-lang.c: Include fold-const.h.
1326 * c-parser.c: Include stringpool.h.
1327 Include attribs.h.
1328 Include stor-layout.h.
1329 Include varasm.h.
1330 Include trans-mem.h.
1331 * c-typeck.c: Include stor-layout.h.
1332 Include trans-mem.h.
1333 Include varasm.h.
1334 Include stmt.h.
1335
38b7bc7f
JM
13362013-11-13 Joseph Myers <joseph@codesourcery.com>
1337
1338 * c-tree.h (c_typespec_keyword): Add cts_auto_type.
1339 * c-decl.c (declspecs_add_type, finish_declspecs): Handle
1340 __auto_type.
1341 * c-parser.c (c_token_starts_typename, c_token_starts_declspecs)
1342 (c_parser_attribute_any_word, c_parser_objc_selector): Handle
1343 RID_AUTO_TYPE.
1344 (c_parser_declspecs): Take argument AUTO_TYPE_OK.
1345 (c_parser_declaration_or_fndef, c_parser_struct_declaration)
1346 (c_parser_declarator, c_parser_direct_declarator_inner)
1347 (c_parser_parameter_declaration, c_parser_type_name): All callers
1348 changed.
1349 (c_parser_declaration_or_fndef): Handle declarations with type
1350 determined from the initializer.
1351
45b0be94
AM
13522013-11-12 Andrew MacLeod <amacleod@redhat.com>
1353
18f429e2 1354 * c-typeck.c: Include gimplify.h.
45b0be94 1355
582d9b50
JM
13562013-11-12 Joseph Myers <joseph@codesourcery.com>
1357
1358 * c-tree.h (struct c_declspecs): Add thread_gnu_p field.
1359 * c-parser.c (c_parser_declspecs): Mention _Thread_local in
1360 comment.
1361 * c-decl.c (shadow_tag_warned, grokdeclarator): Mention __thread
1362 or _Thread_local as appropriate in diagnostics.
1363 (build_null_declspecs): Initialize ret->thread_gnu_p.
1364 (declspecs_add_scspec): Handle either __thread or _Thread_local
1365 for RID_THREAD. Diagnose _Thread_local for pre-C11 standards if
1366 pedantic. Do not disallow _Thread_local extern and _Thread_local
1367 static.
1368
267bac10
JM
13692013-11-07 Joseph Myers <joseph@codesourcery.com>
1370 Andrew MacLeod <amacleod@redhat.com>
1371
1372 * c-aux-info.c (gen_type): Handle atomic qualifier.
1373 * c-decl.c (validate_proto_after_old_defn): Do not remove atomic
1374 qualifiers when compating types.
1375 (shadow_tag_warned): Handle atomic_p in declspecs.
1376 (quals_from_declspecs): Likewise.
1377 (start_decl): Use c_type_promotes_to when promoting argument
1378 types.
1379 (grokdeclarator): Handle _Atomic.
1380 (get_parm_info): Diagnose any qualifier on "void" as only
1381 parameter.
1382 (store_parm_decls_oldstyle): Do not remove atomic qualifiers when
1383 comparing types. Use c_type_promotes_to when promoting argument
1384 types.
1385 (finish_function): Use c_type_promotes_to when promoting argument
1386 types.
1387 (build_null_declspecs): Handle atomic_p in declspecs.
1388 (declspecs_add_qual): Handle RID_ATOMIC.
1389 * c-parser.c (c_token_starts_typename, c_token_is_qualifier)
1390 (c_token_starts_declspecs): Handle RID_ATOMIC.
1391 (c_parser_declspecs): Handle atomic type specifiers and
1392 qualifiers.
1393 (c_parser_typeof_specifier): Remove const and _Atomic qualifiers
1394 from types of expressions with atomic type.
1395 (c_parser_direct_declarator_inner): Use convert_lvalue_to_rvalue.
1396 (c_parser_attribute_any_word): Handle RID_ATOMIC.
1397 (c_parser_initializer, c_parser_initelt, c_parser_initval)
1398 (c_parser_statement_after_labels, c_parser_switch_statement)
1399 (c_parser_for_statement, c_parser_expr_no_commas)
1400 (c_parser_conditional_expression, c_parser_binary_expression)
1401 (c_parser_cast_expression, c_parser_unary_expression)
1402 (c_parser_postfix_expression)
1403 (c_parser_postfix_expression_after_primary, c_parser_expression):
1404 Use convert_lvalue_to_rvalue.
1405 (c_parser_expression_conv, c_parser_expr_list): Document
1406 conversion of lvalues to rvalues. Use convert_lvalue_to_rvalue.
1407 (c_parser_objc_synchronized_statement): Use
1408 convert_lvalue_to_rvalue.
1409 (c_parser_objc_selector): Handle RID_ATOMIC.
1410 (c_parser_objc_receiver, c_parser_array_notation): Use
1411 convert_lvalue_to_rvalue.
1412 * c-tree.h (ctsk_typeof): Adjust comment to mention use for
1413 _Atomic (type-name).
1414 (struct c_declspecs): Add atomic_p field.
1415 (convert_lvalue_to_rvalue): Declare.
1416 * c-typeck.c (c_type_promotes_to): Promote atomic types to
1417 corresponding atomic types.
1418 (qualify_type): Don't add _Atomic qualifiers from second argument.
1419 (comp_target_types): Do not allow _Atomic mismatches.
1420 (type_lists_compatible_p): Do not remove atomic qualifiers when
1421 comparing types.
1422 (really_atomic_lvalue, convert_lvalue_to_rvalue)
1423 (build_atomic_assign): New functions.
1424 (build_unary_op): Use build_atomic_assign for atomic increment and
1425 decrement.
1426 (build_conditional_expr): Do not treat _Atomic void as a qualified
1427 version of void.
1428 (build_modify_expr): Use build_atomic_assign for atomic LHS.
1429 (find_anonymous_field_with_type, convert_to_anonymous_field)
1430 (convert_for_assignment): Do not remove atomic qualifiers when
1431 comparing types.
1432 (digest_init): Do not accept initialization of arrays of atomic
1433 elements by string constants.
1434 (build_asm_expr): Use convert_lvalue_to_rvalue.
1435 (build_binary_op): Do not treat _Atomic void as a qualified
1436 version of void.
1437
0c249d4b
DD
14382013-11-06 DJ Delorie <dj@redhat.com>
1439
1440 * c-decl.c (locate_old_decl): If a previous conflicting decl is
1441 both explicit and builtin, print the location of the explicit one.
1442
6d7f7e0a
TB
14432013-11-05 Tobias Burnus <burnus@net-b.de>
1444
1445 * c-parser.c (c_parser_omp_for, c_parser_omp_parallel,
1446 c_parser_omp_distribute, c_parser_omp_teams,
1447 c_parser_omp_target, c_parser_omp_declare): Handle
1448 -fopenmp-simd.
1449
b906f4ca
MP
14502013-11-03 Marek Polacek <polacek@redhat.com>
1451
1452 * c-decl.c (grokdeclarator): Add VLA instrumentation.
1453
ee1d5a02
JJ
14542013-11-01 Jakub Jelinek <jakub@redhat.com>
1455
1456 * c-typeck.c (c_finish_omp_clauses) <case OMP_CLAUSE_UNIFORM>: Go to
1457 check_dup_generic at the end, unless remove is true.
1458 (c_finish_omp_clauses) <case OMP_CLAUSE_REDUCTION>: Add break; after
1459 remove = true;.
1460 (c_finish_omp_clauses) <case OMP_CLAUSE_COPYIN>: Likewise.
1461
5a9785fb
JJ
14622013-10-31 Jakub Jelinek <jakub@redhat.com>
1463
1464 * c-typeck.c (c_finish_omp_clauses): Diagnose aligned clause
1465 with decl that is not pointer nor array.
1466
939b37da
BI
14672013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
1468
1469 * c-decl.c (finish_function): Added a call for insert_cilk_frame when
1470 a spawning function is found.
1471 * c-objc-common.h (LANG_HOOKS_CILKPLUS_GIMPLIFY_SPAWN): New #define.
1472 (LANG_HOOKS_CILKPLUS_FRAME_CLEANUP): Likewise.
1473 (LANG_HOOKS_CILKPLUS_DETECT_SPAWN_AND_UNWRAP): Likewise.
1474 * c-parser.c (c_parser_statement_after_labels): Added RID_CILK_SYNC
1475 case.
1476 (c_parser_postfix_expression): Added RID_CILK_SPAWN case.
1477 * c-typeck.c (build_compound_expr): Reject _Cilk_spawn in a comma
1478 expr.
1479 (c_finish_return): Added a check to reject _Cilk_spawn in return
1480 expression.
1481 (build_cilk_spawn): New function.
1482 (build_cilk_sync): Likewise.
1483 * Makefile.in (c-decl.o): Added cilk.h in dependency list.
1484
d4af74d4
TB
14852013-10-27 Tobias Burnus <burnus@net-b.de>
1486
1487 PR other/33426
1488 * c-parser.c (c_parser_while_statement, c_parser_while_statement,
1489 c_parser_pragma): Add GCC ivdep support to 'do' and 'while'.
1490 (c_parser_statement_after_labels): Update calls.
1491
d73749df 14922013-10-24 Tobias Burnus <burnus@net-b.de>
8170608b
TB
1493
1494 PR other/33426
1495 * c-parser.c (c_parser_pragma, c_parser_for_statement):
1496 Handle PRAGMA_IVDEP.
1497 (c_parser_statement_after_labels): Update call.
1498
f28aa681
MP
14992013-10-24 Marek Polacek <polacek@redhat.com>
1500
1501 * c-parser.c (c_parser_struct_declaration): Add a comment.
1502 (c_parser_declarator): Don't allow _Alignas here.
1503
0645c1a2
AM
15042013-10-17 Andrew MacLeod <amacleod@redhat.com>
1505
1506 * c-parser.c: Include omp-low.h.
1507 * c-typeck.c: Likewise.
1508
568a31f2
MP
15092013-10-17 Marek Polacek <polacek@redhat.com>
1510
1511 PR c/58267
1512 * c-parser.c (c_parser_declspecs): Add alignspec_ok parameter.
1513 Document syntax of the array-declarator.
1514 (c_parser_declspecs) <RID_ALIGNAS>: Bail out if alignment specs
1515 are not permitted.
1516 (c_parser_declaration_or_fndef): Adjust c_parser_declspecs call.
1517 (c_parser_struct_declaration): Likewise.
1518 (c_parser_declarator): Likewise.
1519 (c_parser_direct_declarator_inner): Likewise.
1520 (c_parser_parameter_declaration): Likewise.
1521 (c_parser_type_name): Likewise.
1522
acf0174b
JJ
15232013-10-11 Jakub Jelinek <jakub@redhat.com>
1524
1525 * c-lang.h (current_omp_declare_target_attribute): New extern
1526 decl.
1527 * c-parser.c: Include c-lang.h.
1528 (struct c_parser): Change tokens to c_token *.
1529 Add tokens_buf field. Change tokens_avail type to unsigned int.
1530 (c_parser_consume_token): If parser->tokens isn't
1531 &parser->tokens_buf[0], increment parser->tokens.
1532 (c_parser_consume_pragma): Likewise.
1533 (enum pragma_context): Add pragma_struct and pragma_param.
1534 (c_parser_external_declaration): Adjust
1535 c_parser_declaration_or_fndef caller.
1536 (c_parser_declaration_or_fndef): Add omp_declare_simd_clauses
1537 argument, if it is non-vNULL vector, call c_finish_omp_declare_simd.
1538 Adjust recursive call.
1539 (c_parser_struct_or_union_specifier): Use pragma_struct instead
1540 of pragma_external.
1541 (c_parser_parameter_declaration): Use pragma_param instead of
1542 pragma_external.
1543 (c_parser_compound_statement_nostart, c_parser_label,
1544 c_parser_for_statement): Adjust
1545 c_parser_declaration_or_fndef callers.
1546 (c_parser_expr_no_commas): Add omp_atomic_lhs argument, pass
1547 it through to c_parser_conditional_expression.
1548 (c_parser_conditional_expression): Add omp_atomic_lhs argument,
1549 pass it through to c_parser_binary_expression. Adjust recursive
1550 call.
1551 (c_parser_binary_expression): Remove prec argument, add
1552 omp_atomic_lhs argument instead. Always start from PREC_NONE, if
1553 omp_atomic_lhs is non-NULL and one of the arguments of toplevel
1554 binop matches it, use build2 instead of parser_build_binary_op.
1555 (c_parser_pragma): Handle PRAGMA_OMP_CANCEL,
1556 PRAGMA_OMP_CANCELLATION_POINT, PRAGMA_OMP_TARGET,
1557 PRAGMA_OMP_END_DECLARE_TARGET, PRAGMA_OMP_DECLARE_REDUCTION.
1558 Handle pragma_struct and pragma_param the same as pragma_external.
1559 (c_parser_omp_clause_name): Parse new OpenMP 4.0 clause names.
1560 (c_parser_omp_variable_list): Parse array sections for
1561 OMP_CLAUSE_{DEPEND,MAP,TO,FROM} clauses.
1562 (c_parser_omp_clause_collapse): Fully fold collapse expression.
1563 (c_parser_omp_clause_reduction): Handle user defined reductions.
1564 (c_parser_omp_clause_branch, c_parser_omp_clause_cancelkind,
1565 c_parser_omp_clause_num_teams, c_parser_omp_clause_thread_limit,
1566 c_parser_omp_clause_aligned, c_parser_omp_clause_linear,
1567 c_parser_omp_clause_safelen, c_parser_omp_clause_simdlen,
1568 c_parser_omp_clause_depend, c_parser_omp_clause_map,
1569 c_parser_omp_clause_device, c_parser_omp_clause_dist_schedule,
1570 c_parser_omp_clause_proc_bind, c_parser_omp_clause_to,
1571 c_parser_omp_clause_from, c_parser_omp_clause_uniform): New functions.
1572 (c_parser_omp_all_clauses): Add finish_p argument. Don't call
1573 c_finish_omp_clauses if it is false. Handle new OpenMP 4.0 clauses.
1574 (c_parser_omp_atomic): Parse seq_cst clause, pass true if it is
1575 present to c_finish_omp_atomic. Handle OpenMP 4.0 atomic forms.
1576 (c_parser_omp_for_loop): Add CODE argument, pass it through
1577 to c_finish_omp_for. Change last argument to cclauses,
1578 and adjust uses to grab parallel clauses from the array of all
1579 the split clauses. Adjust c_parser_binary_expression,
1580 c_parser_declaration_or_fndef and c_finish_omp_for callers.
1581 (omp_split_clauses): New function.
1582 (c_parser_omp_simd): New function.
1583 (c_parser_omp_for): Add p_name, mask and cclauses arguments.
1584 Allow the function to be called also when parsing combined constructs,
1585 and call c_parser_omp_simd when parsing for simd.
1586 (c_parser_omp_sections_scope): If section-sequence doesn't start with
1587 #pragma omp section, require exactly one structured-block instead of
1588 sequence of statements.
1589 (c_parser_omp_sections): Add p_name, mask and cclauses arguments.
1590 Allow the function to be called also when parsing combined constructs.
1591 (c_parser_omp_parallel): Add p_name, mask and cclauses arguments.
1592 Allow the function to be called also when parsing combined
1593 constructs.
1594 (c_parser_omp_taskgroup, c_parser_omp_cancel,
1595 c_parser_omp_cancellation_point, c_parser_omp_distribute,
1596 c_parser_omp_teams, c_parser_omp_target_data,
1597 c_parser_omp_target_update, c_parser_omp_target,
1598 c_parser_omp_declare_simd, c_finish_omp_declare_simd,
1599 c_parser_omp_declare_target, c_parser_omp_end_declare_target,
1600 c_parser_omp_declare_reduction, c_parser_omp_declare): New functions.
1601 (c_parser_omp_construct): Add p_name and mask vars. Handle
1602 PRAGMA_OMP_DISTRIBUTE, PRAGMA_OMP_SIMD, PRAGMA_OMP_TASKGROUP,
1603 PRAGMA_OMP_TEAMS. Adjust c_parser_omp_for, c_parser_omp_parallel
1604 and c_parser_omp_sections callers.
1605 (c_parse_file): Initialize tparser.tokens and the_parser->tokens here.
1606 (OMP_FOR_CLAUSE_MASK, OMP_SECTIONS_CLAUSE_MASK,
1607 OMP_SINGLE_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1.
1608 (OMP_PARALLEL_CLAUSE_MASK): Likewise. Add OMP_CLAUSE_PROC_BIND.
1609 (OMP_TASK_CLAUSE_MASK): Use OMP_CLAUSE_MASK_1 instead of 1. Add
1610 OMP_CLAUSE_DEPEND.
1611 (OMP_SIMD_CLAUSE_MASK, OMP_CANCEL_CLAUSE_MASK,
1612 OMP_CANCELLATION_POINT_CLAUSE_MASK, OMP_DISTRIBUTE_CLAUSE_MASK,
1613 OMP_TEAMS_CLAUSE_MASK, OMP_TARGET_DATA_CLAUSE_MASK,
1614 OMP_TARGET_UPDATE_CLAUSE_MASK, OMP_TARGET_CLAUSE_MASK,
1615 OMP_DECLARE_SIMD_CLAUSE_MASK): Define.
1616 * c-typeck.c: Include tree-inline.h.
1617 (c_finish_omp_cancel, c_finish_omp_cancellation_point,
1618 handle_omp_array_sections_1, handle_omp_array_sections,
1619 c_clone_omp_udr, c_find_omp_placeholder_r): New functions.
1620 (c_finish_omp_clauses): Handle new OpenMP 4.0 clauses and
1621 user defined reductions.
1622 (c_tree_equal): New function.
1623 * c-tree.h (temp_store_parm_decls, temp_pop_parm_decls,
1624 c_finish_omp_cancel, c_finish_omp_cancellation_point, c_tree_equal,
1625 c_omp_reduction_id, c_omp_reduction_decl, c_omp_reduction_lookup,
1626 c_check_omp_declare_reduction_r): New prototypes.
1627 * c-decl.c (current_omp_declare_target_attribute): New variable.
1628 (c_decl_attributes): New function.
1629 (start_decl, start_function): Use it instead of decl_attributes.
1630 (temp_store_parm_decls, temp_pop_parm_decls, c_omp_reduction_id,
1631 c_omp_reduction_decl, c_omp_reduction_lookup,
1632 c_check_omp_declare_reduction_r): New functions.
1633
0a6c2227
TT
16342013-09-25 Tom Tromey <tromey@redhat.com>
1635
1636 * Make-lang.in (c/gccspec.o): Remove.
1637 (CFLAGS-c/gccspec.o): New variable.
1638 (cc1-checksum.o, C_TREE_H, c/c-aux-info.o, c/c-convert.o)
1639 (c/c-decl.o, c/c-errors.o, c/c-lang.o, c/c-objc-common.o)
1640 (c/c-parser.o, c/c-typeck.o, c/c-array-notation.o): Remove.
1641
f3bc55f0
TT
16422013-09-25 Tom Tromey <tromey@redhat.com>
1643
1644 * Make-lang.in (c/gccspec.o): Don't use subshell.
1645
a24d975c
MP
16462013-09-18 Marek Polacek <polacek@redhat.com>
1647
1648 PR sanitize/58443
1649 * c-typeck.c (build_binary_op): Properly honor -fsanitize options.
1650 Remove unnecessary check.
1651
ce6923c5
MP
16522013-09-18 Marek Polacek <polacek@redhat.com>
1653
1654 PR sanitizer/58411
1655 * c-typeck.c (build_binary_op): Don't sanitize function if it has the
1656 no_sanitize_undefined attribute.
1657
a1e51df9
KT
16582013-09-13 Kai Tietz <ktietz@redhat.com>
1659
1660 PR target/57848
1661 * c-decl.c (c_builtin_function_ext_scope): Remove
1662 wrong assumption that it is never called on prexisting
1663 symbol.
1664
0af94e6f
JR
16652013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
1666
1667 * c-typeck.c (build_binary_op): Use vector_types_compatible_elements_p.
1668
20059c8b
GDR
16692013-09-03 Gabriel Dos Reis <gdr@integrable-solutions.net>
1670
1671 * c-objc-common.c (c_tree_printer): Tidy.
1672
de5a5fa1
MP
16732013-08-30 Marek Polacek <polacek@redhat.com>
1674
1675 * c-typeck.c (build_binary_op): Add division by zero and shift
1676 instrumentation.
1677
2531a1d9 16782013-08-26 Joern Rennecke <joern.rennecke@embecosm.com>
0fdd4508 1679 Joseph Myers <joseph@codesourcery.com>
2531a1d9 1680
6e2bcc98 1681 PR c/35649
2531a1d9
JR
1682 * c-typeck.c (c_common_type): Prefer double_type_node over
1683 other REAL_TYPE types with the same precision.
1684 (convert_arguments): Likewise.
1685
025311c4
GDR
16862013-08-23 Gabriel Dos Reis <gdr@integrable-solutions.net>
1687
1688 * c-objc-common.c (c_tree_printer): Document the nature of the cast.
1689 (c_initialize_diagnostics): Call a destructor for the early printer.
1690
da6ca2b5
GDR
16912013-08-22 Gabriel Dos Reis <gdr@integrable-solutions.net>
1692
1693 * c-objc-common.c (c_initialize_diagnostics): Simplify C pretty
1694 printer initialization.
1695
318cda85 16962013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
da6ca2b5 1697
318cda85
BI
1698 PR c/57490
1699 * c-array-notation.c (fix_conditional_array_notations_1): Added a
1700 check for truth values.
1701 (expand_array_notation_exprs): Added truth values case. Removed an
1702 unwanted else. Added for-loop to walk through subtrees in default
1703 case.
1704
b066401f
GDR
17052013-08-04 Gabriel Dos Reis <gdr@integrable-solutions.net>
1706
1707 * c-objc-common.c (c_initialize_diagnostics): Don't call pp_base.
1708
fb48aadc
JM
17092013-07-23 Joseph Myers <joseph@codesourcery.com>
1710
1711 * c-parser.c (struct c_generic_association): Fix typo.
1712
433cc7b0
TT
17132013-07-23 Tom Tromey <tromey@redhat.com>
1714 Joseph Myers <joseph@codesourcery.com>
1715
1716 * c-parser.c (struct c_generic_association): New.
1717 (c_generic_association_d): New typedef.
1718 (c_parser_generic_selection): New function.
1719 (c_parser_postfix_expression): Handle RID_GENERIC.
1720
26d40c3d
JM
17212013-07-13 Jason Merrill <jason@redhat.com>
1722
1723 PR c++/57793
1724 * c-decl.c (finish_struct): Check for too-large class.
1725
ecdbd01a 17262013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
40d3d530
JR
1727
1728 PR c/57821
1729 * c-typeck.c (set_init_index): When folding, check for index overflow.
1730
1141ed3f
BI
17312013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1732
1733 * c-parser.c (c_parser_array_notation): Removed rejection of array
1734 notations in an array of function pointers.
1735
713b46fa
BI
17362013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
1737
1738 * c-array-notation.c (make_triplet_val_inv): New function.
1739 (create_cmp_incr): Likewise.
1740 (create_array_refs): Likewise.
1741 (fix_builtin_array_notation_fn): Replaced all mallocs with tree vec.
1742 Also modularized common parts between functions and called the function.
1743 (build_array_notation_expr): Likewise.
1744 (fix_conditional_array_notations_1): Likewise.
1745 (fix_array_notation_expr): Likewise.
1746 (fix_array_notation_call_expr): Likewise.
1747
92f20202
MP
17482013-06-18 Marek Polacek <polacek@redhat.com>
1749
1750 PR c/57630
1751 * c-decl.c (check_for_loop_decls): Improve diagnostics messages.
1752
73a23b06
BI
17532013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
1754
1755 * c-array-notation.c (build_array_notation_expr): Reject array notation
1756 mismatch between LHS and RHS even inside a call_expr. Also, removed
1757 a couple while statements that were dead code.
1758
00b8517d
BI
17592013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
1760
1761 * c-array-notation.c (fix_builtin_array_notation_fn): Fully folded
1762 excessive precision expressions in function parameters. Also removed
1763 couple unwanted while statements.
1764
1509bdda
BI
17652013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1766
1767 * c-array-notation.c (expand_array_notation_exprs): Added
1768 ARRAY_NOTATION_REF case.
1769
d60f1706
BI
17702013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
1771
1772 * c-array-notation.c (length_mismatch_in_expr_p): Moved this
1773 function to c-family/array-notation-common.c.
1774 (is_cilkplus_reduce_builtin): Likewise.
1775 (find_rank): Likewise.
1776 (extract_array_notation_exprs): Likewise.
1777 (replace_array_notations): Likewise.
1778 (find_inv_trees): Likewise.
1779 (replace_inv_trees): Likewise.
1780 (contains_array_notation_expr): Likewise.
1781 (find_correct_array_notation_type): Likewise.
1782 (replace_invariant_exprs): Initialized additional_tcodes to NULL.
1783 (struct inv_list): Moved this to c-family/array-notation-common.c.
1784 * c-tree.h (is_cilkplus_builtin_reduce): Remove prototype.
1785
6d6efbb3
BI
17862013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
1787
1788 * c-typeck.c (convert_arguments): Moved checking of builtin cilkplus
1789 reduction functions outside the for-loop. Added a check if the fundecl
1790 is non-NULL. Finally, removed an unwanted if-statement, and made the
1791 body unconditional.
1792
25c22937
BI
17932013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1794
1795 * c-typeck.c (c_finish_if_stmt): Added a check to see if the rank of the
1796 condition of the if-statement matches the rank of else-block and then-
1797 block when array notations are used.
1798 * c-parser.c (c_parser_declaration_or_fndef): Expanded array notation
1799 expression after the entire function body is parsed.
1800 (c_parser_expr_no_commas): Delayed creating array notation expressions
1801 to the end of function parsing.
1802 * c-array-notation.c (fix_conditional_array_notations_1): Expanded the
1803 whole if-statement instead of just the condition.
1804 (expand_array_notation_exprs): Added MODIFY_EXPR case.
1805
edd25645
BI
18062013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
1807
1808 PR c/57474
1809 * c-array-notation.c (build_array_notation_expr): Initialized rhs_length
1810 array to NULL_TREE if they are unused. Also added a check for the
1811 field to be NULL before its fields are used in future.
1812
065ce7f1
RO
18132013-05-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1814
1815 PR bootstrap/57450
1816 * c-array-notation.c (length_mismatch_in_expr_p): Use absu_hwi.
1817 (build_array_notation_expr): Likewise.
1818
36536d79
BI
18192013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
1820
1821 * c-typeck.c (build_array_ref): Added a check to see if array's
1822 index is greater than one. If true, then emit an error.
1823 (build_function_call_vec): Exclude error reporting and checking
1824 for builtin array-notation functions.
1825 (convert_arguments): Likewise.
1826 (c_finish_return): Added a check for array notations as a return
1827 expression. If true, then emit an error.
1828 (c_finish_loop): Added a check for array notations in a loop
1829 condition. If true then emit an error.
1830 (lvalue_p): Added a ARRAY_NOTATION_REF case.
1831 (build_binary_op): Added a check for array notation expr inside
1832 op1 and op0. If present, we call another function to find correct
1833 type.
1834 * Make-lang.in (C_AND_OBJC_OBJS): Added c-array-notation.o.
1835 * c-parser.c (c_parser_compound_statement): Check if array
1836 notation code is used in tree, if so, then transform them into
1837 appropriate C code.
1838 (c_parser_expr_no_commas): Check if array notation is used in LHS
1839 or RHS, if so, then build array notation expression instead of
1840 regular modify.
1841 (c_parser_postfix_expression_after_primary): Added a check for
1842 colon(s) after square braces, if so then handle it like an array
1843 notation. Also, break up array notations in unary op if found.
1844 (c_parser_direct_declarator_inner): Added a check for array
1845 notation.
1846 (c_parser_compound_statement): Added a check for array notation in
1847 a stmt. If one is present, then expand array notation expr.
1848 (c_parser_if_statement): Likewise.
1849 (c_parser_switch_statement): Added a check for array notations in
1850 a switch statement's condition. If true, then output an error.
1851 (c_parser_while_statement): Similarly, but for a while.
1852 (c_parser_do_statement): Similarly, but for a do-while.
1853 (c_parser_for_statement): Similarly, but for a for-loop.
1854 (c_parser_unary_expression): Check if array notation is used in a
1855 pre-increment or pre-decrement expression. If true, then expand
1856 them.
1857 (c_parser_array_notation): New function.
1858 * c-array-notation.c: New file.
1859 * c-tree.h (is_cilkplus_reduce_builtin): Protoize.
1860
cd192ccc
MS
18612013-05-23 Mike Stump <mikestump@comcast.net>
1862
1863 * c-typeck.c (convert_for_assignment): Handle references to memory
1864 spaces better.
1865
427b248d
JM
18662013-05-16 Jason Merrill <jason@redhat.com>
1867
1868 * Make-lang.in (cc1$(exeext)): Use link mutex.
1869
44d90fe1
PC
18702013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
1871
1872 * c-typeck.c (pointer_diff): Change -Wpointer-arith pedwarns
1873 to simply use OPT_Wpointer_arith.
1874 (build_unary_op): Likewise.
1875
4e7d7b3d
JJ
18762013-04-03 Jakub Jelinek <jakub@redhat.com>
1877
1878 PR c/19449
1879 * c-parser.c (c_parser_get_builtin_args): Add choose_expr_p
1880 argument. If set, or it temporarily for parsing of the first
1881 argument into force_folding_builtin_constant_p.
1882 (c_parser_postfix_expression): Adjust callers.
1883
839b422f
RB
18842013-03-21 Richard Biener <rguenther@suse.de>
1885
1886 * c-objc-common.c (c_tree_printer): Use DECL_HAS_DEBUG_EXPR_P
1887 instead of DECL_DEBUG_EXPR_IS_FROM. Guard properly.
1888
2ee028f1
MP
18892013-02-12 Marek Polacek <polacek@redhat.com>
1890
1891 PR c/44938
1892 * c-parser.c (c_parser_postfix_expression_after_primary): Initialize
1893 origtypes to NULL.
1894
8824edff
JJ
18952013-01-24 Jakub Jelinek <jakub@redhat.com>
1896
1897 PR c/56078
1898 * c-typeck.c (set_nonincremental_init_from_string): If
1899 constructor_max_index is NULL, treat it as if tree_int_cst_lt
1900 returned false.
1901 (process_init_element): Likewise.
1902
eadd3d0d
JJ
19032012-12-20 Jakub Jelinek <jakub@redhat.com>
1904
1905 PR c++/55619
1906 * c-parser.c (c_parser_asm_operands): Remove CONVERT_P
1907 argument, don't call default_function_array_conversion
1908 nor c_fully_fold here.
1909 (c_parser_asm_statement): Adjust callers.
1910 * c-typeck.c (build_asm_expr): Call c_fully_fold on inputs
1911 and outputs here, and call default_function_array_conversion
1912 on inputs that don't need to be addressable.
1913
f8a93a2e
JJ
19142012-12-18 Jakub Jelinek <jakub@redhat.com>
1915
1916 PR c/39464
1917 * c-typeck.c (convert_for_assignment): For -Wpointer-sign
1918 warning require that both c_common_unsigned_type as well as
1919 c_common_signed_type is the same for both mvl and mvr types.
1920
9771b263
DN
19212012-11-16 Diego Novillo <dnovillo@google.com>
1922
1923 Adjust for new vec API (http://gcc.gnu.org/wiki/cxx-conversion/cxx-vec)
1924
1925 * c-common.c: Use new vec API in vec.h.
1926 * c-common.h: Likewise.
1927 * c-gimplify.c: Likewise.
1928 * c-pragma.c: Likewise.
1929 * c-pretty-print.c: Likewise.
1930 * c-pretty-print.h: Likewise.
1931 * c-semantics.c: Likewise.
1932 * c-decl.c: Likewise.
1933 * c-parser.c: Likewise.
1934 * c-tree.h: Likewise.
1935 * c-typeck.c: Likewise.
1936
880661a4
JW
19372012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
1938
1939 PR c++/54930
1940 * c-typeck.c (c_finish_return): Use OPT_Wreturn_local_addr.
1941
077d1abe
MLI
19422012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
1943
1944 PR c/53066
1945 * c-decl.c (warn_if_shadowing): Do not warn if a variable
1946 shadows a function, unless the variable is a function or a
1947 pointer-to-function.
1948
3a785c97
JJ
19492012-10-12 Jakub Jelinek <jakub@redhat.com>
1950
1951 PR c/54381
1952 * c-parser.c (struct c_tree_loc_pair): Removed.
1953 (c_parser_expr_list): Remove struct c_tree_loc_pair * argument,
1954 add location_t * and tree * arguments, fill in array of 3
1955 sizeof_arg trees and corresponding locs.
1956 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust
1957 c_parser_expr_list callers.
1958 (c_parser_postfix_expression_after_primary): Likewise. Pass
1959 array of 3 sizeof_arg trees and locs (corresponding to first
1960 3 arguments) to sizeof_pointer_memaccess_warning.
1961
703c8606
LC
19622012-10-09 Lawrence Crowl <crowl@google.com>
1963
1964 * Make-lang.in (c-decl.o): Add dependence on hash-table.h.
1965 * c-decl.c (detect_field_duplicates_hash): Change to new type-safe
1966 hash table.
1967
5d9de0d0
PC
19682012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
1969
1970 PR c++/54194
1971 * c-typeck.c (parser_build_binary_op): Update warn_about_parentheses
1972 call.
1973
a212e43f
MG
19742012-10-09 Marc Glisse <marc.glisse@inria.fr>
1975
1976 PR c++/54427
1977 * c-typeck.c: Include c-common.h.
1978 (enum stv_conv): Moved to c-common.h.
1979 (scalar_to_vector): Moved to c-common.c.
1980 (build_binary_op): Adapt to scalar_to_vector's new prototype.
1981 * Make-lang.in: c-typeck.c depends on c-common.h.
1982
3b78de56
AC
19832012-10-04 Arnaud Charlet <charlet@adacore.com>
1984
1985 * c-decl.c (c_write_global_declarations): Fix handling of
1986 -fdump-ada-spec*.
1987
78c60e3d
SS
19882012-09-30 Sharad Singhai <singhai@google.com>
1989
1990 * c-decl.c (c_write_global_declarations): Use a different method
1991 to determine if the dump has ben initialized.
1992
9f33203d
JM
19932012-09-14 Joseph Myers <joseph@codesourcery.com>
1994
1995 PR c/54552
1996 * c-typeck.c (c_cast_expr): When casting to a type requiring
1997 C_MAYBE_CONST_EXPR to be created, pass the inner expression to
1998 c_fully_fold first.
1999
a27d595d
JM
20002012-09-14 Joseph Myers <joseph@codesourcery.com>
2001
2002 PR c/54103
2003 * c-typeck.c (build_unary_op): Pass original argument of
2004 TRUTH_NOT_EXPR to c_objc_common_truthvalue_conversion, then remove
2005 any C_MAYBE_CONST_EXPR, if it has integer operands.
2006 (build_binary_op): Pass original arguments of TRUTH_ANDIF_EXPR,
2007 TRUTH_ORIF_EXPR, TRUTH_AND_EXPR, TRUTH_OR_EXPR and TRUTH_XOR_EXPR
2008 to c_objc_common_truthvalue_conversion, then remove any
2009 C_MAYBE_CONST_EXPR, if they have integer operands. Use
2010 c_objc_common_truthvalue_conversion not
2011 c_common_truthvalue_conversion.
2012 (c_objc_common_truthvalue_conversion): Build NE_EXPR directly and
2013 call note_integer_operands for arguments with integer operands
2014 that are not integer constants.
2015
9feb29df
JJ
20162012-09-13 Jakub Jelinek <jakub@redhat.com>
2017
2018 PR c/54559
2019 * c-typeck.c (c_finish_return): Do convert to BOOLEAN_TYPE or
2020 COMPLEX_TYPE with in_late_binary_op set temporarily to true.
2021
d409320c
JJ
20222012-08-31 Jakub Jelinek <jakub@redhat.com>
2023
2024 PR c/54428
2025 * c-convert.c (convert): Don't call fold_convert_loc if
2026 TYPE_MAIN_VARIANT of a COMPLEX_TYPE is the same, unless e
2027 is a COMPLEX_EXPR. Remove TYPE_MAIN_VARIANT check from
2028 COMPLEX_TYPE -> COMPLEX_TYPE conversion.
2029
6265d07c
JJ
20302012-08-24 Jakub Jelinek <jakub@redhat.com>
2031
2032 PR c/54355
2033 * c-decl.c (c_parser_label): Pass true as nested and fix up comments
2034 for nested and empty_ok arguments in the call to
2035 c_parser_declaration_or_fndef.
2036
1a4049e7
JJ
20372012-08-17 Jakub Jelinek <jakub@redhat.com>
2038
2039 * c-tree.h (c_last_sizeof_arg): Declare.
2040 * c-parser.c (struct c_tree_loc_pair): New type.
2041 (c_parser_expr_list): Add sizeof_arg argument. Fill it in if
2042 non-NULL.
2043 (c_parser_attributes, c_parser_objc_keywordexpr): Adjust callers.
2044 (c_parser_postfix_expression_after_primary): Likewise. Call
2045 sizeof_pointer_memaccess_warning if needed.
2046 (sizeof_ptr_memacc_comptypes): New function.
2047 * c-typeck.c (c_last_sizeof_arg): New global variable.
2048 (c_expr_sizeof_expr, c_expr_sizeof_type): Initialize it.
2049
0229aee9
UB
20502012-07-24 Uros Bizjak <ubizjak@gmail.com>
2051
2052 * c-lang.h (lang_decl): Add variable_size GTY option.
2053
7ee2468b
SB
20542012-07-16 Steven Bosscher <steven@gcc.gnu.org>
2055
2056 * c-decl.c: Include dumpfile.h instead of tree-dump.h.
2057 * Make-lang.in: Fix dependencies.
2058
d4a10d0a
SB
20592012-06-29 Steven Bosscher <steven@gcc.gnu.org>
2060
2061 * Make-lang.in: New file, rules migrated from gcc/Makefile.in
2062 and add language Makefile hooks.
2063 * config-lang.in: New file.
2064 * c-config-lang.in: Moved from gcc/config-lang.in to here, and
2065 add the required "normal" config-lang.in rules.
2066 * c-lang.h: Moved from gcc/ to here.
2067 * c-tree.h: Likewise.
2068 * c-objc-common.c: Likewise.
2069 * c-objc-common.h: Likewise.
2070 * c-typeck.c: Likewise.
2071 * c-convert.c: Likewise.
2072 * c-lang.c: Likewise.
2073 * c-aux-info.c: Likewise.
2074 * c-errors.c: Likewise.
2075 * gccspec.c: Likewise.
2076 * c-decl.c: Likewise. Include gt-c-c-decl.h, not gt-c-decl.h.
2077 * c-parser.c: Likewise. Include gt-c-c-parser.h, not gt-c-parser.h.
2078\f
5624e564 2079Copyright (C) 2012-2015 Free Software Foundation, Inc.
d4a10d0a
SB
2080
2081Copying and distribution of this file, with or without modification,
2082are permitted in any medium without royalty provided the copyright
2083notice and this notice are preserved.